patch 8.2.4019: Vim9: import mechanism is too complicated
Problem: Vim9: import mechanism is too complicated.
Solution: Do not use the Javascript mechanism but a much simpler one.
diff --git a/src/vim9execute.c b/src/vim9execute.c
index 81f3578..63c07fe 100644
--- a/src/vim9execute.c
+++ b/src/vim9execute.c
@@ -1160,7 +1160,7 @@
if (tv->v_lock)
flags |= ASSIGN_CONST;
save_funccal(&entry);
- set_var_const(name, NULL, tv, FALSE, flags, 0);
+ set_var_const(name, 0, NULL, tv, FALSE, flags, 0);
restore_funccal();
}
@@ -2252,7 +2252,7 @@
if (GA_GROW_FAILS(&ectx->ec_stack, 1))
goto theend;
SOURCING_LNUM = iptr->isn_lnum;
- if (eval_variable(name, (int)STRLEN(name),
+ if (eval_variable(name, (int)STRLEN(name), 0,
STACK_TV_BOT(0), NULL, EVAL_VAR_VERBOSE) == FAIL)
goto on_error;
++ectx->ec_stack.ga_len;