1
0
forked from aniani/vim

patch 8.2.4066: Vim9: imported autoload script loaded again

Problem:    Vim9: imported autoload script loaded again.
Solution:   Do not create a new imported_T every time.
This commit is contained in:
Bram Moolenaar
2022-01-12 11:46:40 +00:00
parent 3cf21b3051
commit 17d36cbcd3
4 changed files with 29 additions and 13 deletions

View File

@@ -623,10 +623,12 @@ find_imported(char_u *name, size_t len, int load, cctx_T *cctx)
if (ret != NULL && load && ret->imp_flags == IMP_FLAGS_AUTOLOAD)
{
scid_T dummy;
// script found before but not loaded yet
ret->imp_flags = 0;
(void)do_source(SCRIPT_ITEM(ret->imp_sid)->sn_name, FALSE,
DOSO_NONE, NULL);
DOSO_NONE, &dummy);
}
return ret;
}