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)
diff --git a/src/scriptfile.c b/src/scriptfile.c
index bbc4156..eefe39a 100644
--- a/src/scriptfile.c
+++ b/src/scriptfile.c
@@ -1128,6 +1128,7 @@
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 @@
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 @@
theend:
vim_free(fname_exp);
+ estack_compiling = save_estack_compiling;
return retval;
}