diff src/vim9compile.c @ 23100:9c3a6c33c0e5 v8.2.2096

patch 8.2.2096: Vim9: command modifiers not restored after assignment Commit: https://github.com/vim/vim/commit/f665e97ffa06817975810cb511b13dbaa83ec630 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Dec 5 19:17:16 2020 +0100 patch 8.2.2096: Vim9: command modifiers not restored after assignment Problem: Vim9: command modifiers not restored after assignment. Solution: Jump to nextline instead of using continue.
author Bram Moolenaar <Bram@vim.org>
date Sat, 05 Dec 2020 19:30:04 +0100
parents 285cde4b8d0e
children b0c88aa0175b
line wrap: on
line diff
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -1933,14 +1933,8 @@ generate_cmdmods(cctx_T *cctx, cmdmod_T 
     static int
 generate_undo_cmdmods(cctx_T *cctx)
 {
-    isn_T	*isn;
-
-    if (cctx->ctx_has_cmdmod)
-    {
-	if ((isn = generate_instr(cctx, ISN_CMDMOD_REV)) == NULL)
-	    return FAIL;
-    }
-
+    if (cctx->ctx_has_cmdmod && generate_instr(cctx, ISN_CMDMOD_REV) == NULL)
+	return FAIL;
     return OK;
 }
 
@@ -7578,7 +7572,7 @@ compile_def_function(ufunc_T *ufunc, int
 			line = compile_assignment(ea.cmd, &ea, CMD_SIZE, &cctx);
 			if (line == NULL || line == ea.cmd)
 			    goto erret;
-			continue;
+			goto nextline;
 		    }
 		}
 	    }
@@ -7590,7 +7584,7 @@ compile_def_function(ufunc_T *ufunc, int
 		if (line == NULL)
 		    goto erret;
 		if (line != ea.cmd)
-		    continue;
+		    goto nextline;
 	    }
 	}
 
@@ -7629,7 +7623,7 @@ compile_def_function(ufunc_T *ufunc, int
 	    if (cctx.ctx_skip == SKIP_YES)
 	    {
 		line += STRLEN(line);
-		continue;
+		goto nextline;
 	    }
 
 	    // Expression or function call.