1
0
forked from aniani/vim

patch 8.2.2975: Vim9: can only use an autoload function name as a string

Problem:    Vim9: can only use an autoload function name as a string.
Solution:   Load the autoload script when encountered. (closes #8124)
This commit is contained in:
Bram Moolenaar
2021-06-11 22:05:47 +02:00
parent 4f13527598
commit f0a4069e3d
5 changed files with 43 additions and 3 deletions

View File

@@ -1128,6 +1128,7 @@ do_source(
proftime_T wait_start;
#endif
int trigger_source_post = FALSE;
int save_estack_compiling = estack_compiling;
ESTACK_CHECK_DECLARATION
p = expand_env_save(fname);
@@ -1142,6 +1143,7 @@ do_source(
smsg(_("Cannot source a directory: \"%s\""), fname);
goto theend;
}
estack_compiling = FALSE;
#ifdef FEAT_EVAL
// See if we loaded this script before.
@@ -1508,6 +1510,7 @@ almosttheend:
theend:
vim_free(fname_exp);
estack_compiling = save_estack_compiling;
return retval;
}