1
0
forked from aniani/vim

patch 8.2.2222: Vim9: cannot keep script variables when reloading

Problem:    Vim9: cannot keep script variables when reloading.
Solution:   Add the "noclear" argument to :vim9script.
This commit is contained in:
Bram Moolenaar
2020-12-26 15:39:31 +01:00
parent b0ac4ea5e1
commit 2b32700dab
8 changed files with 161 additions and 48 deletions

View File

@@ -2594,7 +2594,7 @@ do_one_cmd(
// Set flag that any command was executed, used by ex_vim9script().
if (getline_equal(ea.getline, ea.cookie, getsourceline)
&& current_sctx.sc_sid > 0)
SCRIPT_ITEM(current_sctx.sc_sid)->sn_had_command = TRUE;
SCRIPT_ITEM(current_sctx.sc_sid)->sn_state = SN_STATE_HAD_COMMAND;
/*
* If the command just executed called do_cmdline(), any throw or ":return"