0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.1137: Vim9: modifiers not cleared after compiling function

Problem:    Vim9: modifiers not cleared after compiling function.
Solution:   Clear command modifiers. (closes #6396)
This commit is contained in:
Bram Moolenaar
2020-07-05 18:18:42 +02:00
parent 846178a72c
commit 47e7d70b58
6 changed files with 61 additions and 27 deletions

View File

@@ -6809,6 +6809,7 @@ compile_def_function(ufunc_T *ufunc, int set_return_type, cctx_T *outer_cctx)
exarg_T ea;
int starts_with_colon = FALSE;
char_u *cmd;
int save_msg_scroll = msg_scroll;
// Bail out on the first error to avoid a flood of errors and report
// the right line number when inside try/catch.
@@ -6897,6 +6898,8 @@ compile_def_function(ufunc_T *ufunc, int set_return_type, cctx_T *outer_cctx)
line = (char_u *)"";
continue;
}
// TODO: use modifiers in the command
undo_cmdmod(&ea, save_msg_scroll);
// Skip ":call" to get to the function name.
if (checkforcmd(&ea.cmd, "call", 3))