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

@@ -2921,8 +2921,9 @@ find_var_ht(char_u *name, char_u **varname)
if (ht != NULL)
return ht; // local variable
// in Vim9 script items at the script level are script-local
if (in_vim9script())
// In Vim9 script items at the script level are script-local, except
// for autoload names.
if (in_vim9script() && vim_strchr(name, AUTOLOAD_CHAR) == NULL)
{
ht = get_script_local_ht();
if (ht != NULL)