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:
@@ -2227,6 +2227,16 @@ exec_instructions(ectx_T *ectx)
|
||||
}
|
||||
di = find_var_in_ht(ht, 0, iptr->isn_arg.string, TRUE);
|
||||
|
||||
if (di == NULL && ht == get_globvar_ht())
|
||||
{
|
||||
// may need to load autoload script
|
||||
if (script_autoload(iptr->isn_arg.string, FALSE))
|
||||
di = find_var_in_ht(ht, 0,
|
||||
iptr->isn_arg.string, TRUE);
|
||||
if (did_emsg)
|
||||
goto on_error;
|
||||
}
|
||||
|
||||
if (di == NULL)
|
||||
{
|
||||
SOURCING_LNUM = iptr->isn_lnum;
|
||||
|
Reference in New Issue
Block a user