1
0
forked from aniani/vim

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.
This commit is contained in:
Bram Moolenaar
2020-12-05 19:17:16 +01:00
parent 4029cabbe7
commit f665e97ffa
4 changed files with 50 additions and 12 deletions

View File

@@ -1933,14 +1933,8 @@ generate_cmdmods(cctx_T *cctx, cmdmod_T *cmod)
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 set_return_type, cctx_T *outer_cctx)
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 set_return_type, cctx_T *outer_cctx)
if (line == NULL)
goto erret;
if (line != ea.cmd)
continue;
goto nextline;
}
}
@@ -7629,7 +7623,7 @@ compile_def_function(ufunc_T *ufunc, int set_return_type, cctx_T *outer_cctx)
if (cctx.ctx_skip == SKIP_YES)
{
line += STRLEN(line);
continue;
goto nextline;
}
// Expression or function call.