patch 8.2.4050: Vim9: need to prefix every item in an autoload script
Problem: Vim9: need to prefix every item in an autoload script.
Solution: First step in supporting "vim9script autoload" and "import
autoload".
diff --git a/src/userfunc.c b/src/userfunc.c
index b772913..ecd2e7c 100644
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -1608,7 +1608,7 @@
p = name + 2;
len -= 2;
}
- import = find_imported(p, len, NULL);
+ import = find_imported(p, len, FALSE, NULL);
// imported function from another script
if (import != NULL)
@@ -4079,6 +4079,9 @@
else
eap->skip = TRUE;
}
+
+// if (is_export)
+// name = may_prefix_autoload(name);
}
// An error in a function call during evaluation of an expression in magic
@@ -4363,7 +4366,7 @@
{
char_u *uname = untrans_function_name(name);
- import = find_imported(uname == NULL ? name : uname, 0, NULL);
+ import = find_imported(uname == NULL ? name : uname, 0, FALSE, NULL);
}
if (fp != NULL || import != NULL)