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.
diff --git a/src/edit.c b/src/edit.c
index 739f078..0363129 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -1055,8 +1055,9 @@
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.