diff src/edit.c @ 27140:a9eeb18e749c v8.2.4099

patch 8.2.4099: Vim9: cannot use Vim9 syntax in mapping Commit: https://github.com/vim/vim/commit/e32c3c462ce9b3163a4a4bffd985897910885d29 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 15 18:26:04 2022 +0000 patch 8.2.4099: Vim9: cannot use Vim9 syntax in mapping Problem: Vim9: cannot use Vim9 syntax in mapping. Solution: Add <ScriptCmd> to use the script context for a command.
author Bram Moolenaar <Bram@vim.org>
date Sat, 15 Jan 2022 19:30:04 +0100
parents 268f6a3511df
children 63179e8300f8
line wrap: on
line diff
--- a/src/edit.c
+++ b/src/edit.c
@@ -1055,8 +1055,9 @@ doESCkey:
 	case K_IGNORE:	// Something mapped to nothing
 	    break;
 
-	case K_COMMAND:		// <Cmd>command<CR>
-	    do_cmdline(NULL, getcmdkeycmd, NULL, 0);
+	case K_COMMAND:		    // <Cmd>command<CR>
+	case K_SCRIPT_COMMAND:	    // <ScriptCmd>command<CR>
+	    do_cmdkey_command(c, 0);
 #ifdef FEAT_TERMINAL
 	    if (term_use_loop())
 		// Started a terminal that gets the input, exit Insert mode.