0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.0154: reallocating the list of scripts is inefficient

Problem:    Reallocating the list of scripts is inefficient.
Solution:   Instead of using a growarray of scriptitem_T, store pointers and
            allocate each scriptitem_T separately.  Also avoids that the
            growarray pointers change when sourcing a new script.
This commit is contained in:
Bram Moolenaar
2020-01-26 19:26:46 +01:00
parent b3de5114ac
commit 21b9e9773d
10 changed files with 54 additions and 46 deletions

View File

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