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)
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 0573897..692192b 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -2750,6 +2750,10 @@
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 @@
}
/*
- * Unod and free contents of "cmdmod".
+ * Undo and free contents of "cmdmod".
*/
void
undo_cmdmod(exarg_T *eap, int save_msg_scroll)