mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
patch 8.2.1178: Vim9: filter function recognized as command modifier
Problem: Vim9: filter function recognized as command modifier, leading to a crash. Solution: Clear cmdmod after freeing items. Do not recognize a command modifier followed by non-white space. (closes #6434)
This commit is contained in:
@@ -2750,6 +2750,10 @@ parse_command_modifiers(exarg_T *eap, char **errormsg, int skip_only)
|
||||
if (*p == NUL || ends_excmd(*p))
|
||||
break;
|
||||
}
|
||||
// Avoid that "filter(arg)" is recognized.
|
||||
if (in_vim9script() && !VIM_ISWHITE(*p))
|
||||
break;
|
||||
|
||||
if (skip_only)
|
||||
p = skip_vimgrep_pat(p, NULL, NULL);
|
||||
else
|
||||
@@ -2904,7 +2908,7 @@ parse_command_modifiers(exarg_T *eap, char **errormsg, int skip_only)
|
||||
}
|
||||
|
||||
/*
|
||||
* Unod and free contents of "cmdmod".
|
||||
* Undo and free contents of "cmdmod".
|
||||
*/
|
||||
void
|
||||
undo_cmdmod(exarg_T *eap, int save_msg_scroll)
|
||||
|
Reference in New Issue
Block a user