0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.4072: Vim9: compiling function fails when autoload is not loaded

Problem:    Vim9: compiling function fails when autoload script is not loaded
            yet.
Solution:   Depend on runtime loading.
This commit is contained in:
Bram Moolenaar
2022-01-12 19:54:00 +00:00
parent 53c296112e
commit d041f4208b
6 changed files with 83 additions and 4 deletions

View File

@@ -488,7 +488,16 @@ handle_import(
// we need a scriptitem without loading the script
sid = find_script_in_rtp(from_name);
vim_free(from_name);
res = SCRIPT_ID_VALID(sid) ? OK : FAIL;
if (SCRIPT_ID_VALID(sid))
{
scriptitem_T *si = SCRIPT_ITEM(sid);
if (si->sn_autoload_prefix == NULL)
si->sn_autoload_prefix = get_autoload_prefix(si);
res = OK;
}
else
res = FAIL;
}
else
{