patch 9.1.1154: Vim9: not able to use autoload class accross scripts
Problem: Vim9: not able to use autoload class accross scripts
Solution: make it work, re-enable the test (Yegappan Lakshmanan)
fixes: #15031
closes: #16748
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/evalvars.c b/src/evalvars.c
index 1b11f28..2745ac2 100644
--- a/src/evalvars.c
+++ b/src/evalvars.c
@@ -3087,6 +3087,9 @@
dictitem_T *v = find_var_in_ht(ht, 0, name,
flags & EVAL_VAR_NOAUTOLOAD);
+ if (v == NULL)
+ v = find_var_autoload_prefix(name, sid, NULL, NULL);
+
if (v != NULL)
{
tv = &v->di_tv;