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.
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 2cd4b52..ee3d89e 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -1933,14 +1933,8 @@
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 @@
line = compile_assignment(ea.cmd, &ea, CMD_SIZE, &cctx);
if (line == NULL || line == ea.cmd)
goto erret;
- continue;
+ goto nextline;
}
}
}
@@ -7590,7 +7584,7 @@
if (line == NULL)
goto erret;
if (line != ea.cmd)
- continue;
+ goto nextline;
}
}
@@ -7629,7 +7623,7 @@
if (cctx.ctx_skip == SKIP_YES)
{
line += STRLEN(line);
- continue;
+ goto nextline;
}
// Expression or function call.