Mercurial > vim
diff src/evalvars.c @ 19285:86665583dc83 v8.2.0201
patch 8.2.0201: cannot assign to an imported variable
Commit: https://github.com/vim/vim/commit/4e12a5df37ed4a47ca94a8b9393c768e8ca1f75a
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Feb 3 20:50:59 2020 +0100
patch 8.2.0201: cannot assign to an imported variable
Problem: Cannot assign to an imported variable.
Solution: Make it work.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 03 Feb 2020 21:00:04 +0100 |
parents | 9dc843109c97 |
children | 2bb0e80fcd32 |
line wrap: on
line diff
--- a/src/evalvars.c +++ b/src/evalvars.c @@ -2296,7 +2296,7 @@ get_var_tv( 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 @@ lookup_scriptvar(char_u *name, size_t le 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)