mirror of
https://github.com/neovim/neovim.git
synced 2025-09-19 01:38:16 +00:00
vim-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.
21b9e9773d
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -2524,7 +2524,7 @@ static char *get_scriptnames_arg(expand_T *xp FUNC_ATTR_UNUSED, int idx)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
scriptitem_T *si = &SCRIPT_ITEM(idx + 1);
|
||||
scriptitem_T *si = SCRIPT_ITEM(idx + 1);
|
||||
home_replace(NULL, si->sn_name, NameBuff, MAXPATHL, true);
|
||||
return NameBuff;
|
||||
}
|
||||
|
Reference in New Issue
Block a user