patch 8.2.0201: cannot assign to an imported variable
Problem: Cannot assign to an imported variable.
Solution: Make it work.
diff --git a/src/evalvars.c b/src/evalvars.c
index 32c803f..2bbc355 100644
--- a/src/evalvars.c
+++ b/src/evalvars.c
@@ -2296,7 +2296,7 @@
if (tv == NULL && current_sctx.sc_version == SCRIPT_VERSION_VIM9)
{
- imported_T *import = find_imported(name, NULL);
+ imported_T *import = find_imported(name, 0, NULL);
// imported variable from another script
if (import != NULL)
@@ -2472,7 +2472,7 @@
res = HASHITEM_EMPTY(hi) ? -1 : 1;
// if not script-local, then perhaps imported
- if (res == -1 && find_imported(p, NULL) != NULL)
+ if (res == -1 && find_imported(p, 0, NULL) != NULL)
res = 1;
if (p != buffer)