diff src/vim9compile.c @ 21255:4be91a7eafb2 v8.2.1178

patch 8.2.1178: Vim9: filter function recognized as command modifier Commit: https://github.com/vim/vim/commit/b074e8b8d4d3cefefc675dfaf3982d388ee07772 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jul 11 13:40:45 2020 +0200 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)
author Bram Moolenaar <Bram@vim.org>
date Sat, 11 Jul 2020 13:45:04 +0200
parents d1215fcdbca8
children 6a4806e326dd
line wrap: on
line diff
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -6963,6 +6963,7 @@ compile_def_function(ufunc_T *ufunc, int
 	}
 	// TODO: use modifiers in the command
 	undo_cmdmod(&ea, save_msg_scroll);
+	CLEAR_FIELD(cmdmod);
 
 	// Skip ":call" to get to the function name.
 	if (checkforcmd(&ea.cmd, "call", 3))