1
0
forked from aniani/vim

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)
This commit is contained in:
Bram Moolenaar
2020-07-28 20:07:27 +02:00
parent 0aac67a431
commit ae616494d7
8 changed files with 78 additions and 26 deletions

View File

@@ -7409,6 +7409,13 @@ compile_def_function(ufunc_T *ufunc, int set_return_type, cctx_T *outer_cctx)
// 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;