summaryrefslogtreecommitdiffstats
path: root/src/ex_docmd.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-01-26 19:26:46 +0100
committerBram Moolenaar <Bram@vim.org>2020-01-26 19:26:46 +0100
commit21b9e9773d64de40994f8762173bdd8befa6acf7 (patch)
tree4aa50f453c1dda97881a6bb3153e2246bc4a95ed /src/ex_docmd.c
parentb3de5114acdc5859cf068d5fde9d7cb2bb34aa31 (diff)
patch 8.2.0154: reallocating the list of scripts is inefficientv8.2.0154
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.
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r--src/ex_docmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 0e6b8dc89b..c0ed1c88c6 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -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"