mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
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:
@@ -3084,7 +3084,13 @@ compile_load(
|
||||
if (name == NULL)
|
||||
return FAIL;
|
||||
|
||||
if (arg_exists(*arg, len, &idx, &type, &gen_load_outer, cctx) == OK)
|
||||
if (vim_strchr(name, AUTOLOAD_CHAR) != NULL)
|
||||
{
|
||||
script_autoload(name, FALSE);
|
||||
res = generate_LOAD(cctx, ISN_LOADAUTO, 0, name, &t_any);
|
||||
}
|
||||
else if (arg_exists(*arg, len, &idx, &type, &gen_load_outer, cctx)
|
||||
== OK)
|
||||
{
|
||||
if (gen_load_outer == 0)
|
||||
gen_load = TRUE;
|
||||
|
Reference in New Issue
Block a user