0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.2.4053: Vim9: autoload mechanism doesn't fully work yet

Problem:    Vim9: autoload mechanism doesn't fully work yet.
Solution:   Define functions and variables with their autoload name, add the
            prefix when calling a function, find the variable in the table of
            script variables.
This commit is contained in:
Bram Moolenaar
2022-01-10 18:08:00 +00:00
parent ee63031b57
commit fe2ef0b2cd
9 changed files with 139 additions and 52 deletions

View File

@@ -4080,8 +4080,11 @@ define_function(exarg_T *eap, char_u *name_arg, garray_T *lines_to_free)
eap->skip = TRUE;
}
// if (is_export)
// name = may_prefix_autoload(name);
// For "export def FuncName()" in an autoload script the function name
// is stored with the legacy autoload name "dir#script#FuncName" so
// that it can also be found in legacy script.
if (is_export)
name = may_prefix_autoload(name);
}
// An error in a function call during evaluation of an expression in magic