patch 8.2.1308: Vim9: accidentally using "x" causes Vim to exit
Problem: Vim9: accidentally using "x" causes Vim to exit.
Solution: Disallow using ":x" or "xit" in Vim9 script. (closes #6399)
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 1ed3211..cbb9231 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -7409,6 +7409,13 @@
// TODO: other commands with an expression argument
+ case CMD_append:
+ case CMD_change:
+ case CMD_insert:
+ case CMD_xit:
+ not_in_vim9(&ea);
+ goto erret;
+
case CMD_SIZE:
semsg(_("E476: Invalid command: %s"), ea.cmd);
goto erret;