diff src/vim9compile.c @ 23477:95db03521b01 v8.2.2281

patch 8.2.2281: Vim9: compiled "wincmd" cannot be followed by bar Commit: https://github.com/vim/vim/commit/a11919fa44fb43e947ef7871f31096a79429ec8a Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 2 19:44:56 2021 +0100 patch 8.2.2281: Vim9: compiled "wincmd" cannot be followed by bar Problem: Vim9: compiled "wincmd" cannot be followed by bar. Solution: Check for bar after "wincmd". (closes https://github.com/vim/vim/issues/7599)
author Bram Moolenaar <Bram@vim.org>
date Sat, 02 Jan 2021 20:00:03 +0100
parents ad83c0ff34c0
children ac5ead954dcd
line wrap: on
line diff
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -7329,6 +7329,20 @@ compile_exec(char_u *line, exarg_T *eap,
 	    if (eap->nextcmd != NULL)
 		nextcmd = eap->nextcmd;
 	}
+	else if (eap->cmdidx == CMD_wincmd)
+	{
+	    p = eap->arg;
+	    if (*p != NUL)
+		++p;
+	    if (*p == 'g' || *p == Ctrl_G)
+		++p;
+	    p = skipwhite(p);
+	    if (*p == '|')
+	    {
+		*p = NUL;
+		nextcmd = p + 1;
+	    }
+	}
     }
 
     if (eap->cmdidx == CMD_syntax && STRNCMP(eap->arg, "include ", 8) == 0)