diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-01-10 18:42:52 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-01-10 18:42:52 +0000 |
commit | 577bd85d55f30019c890ec80fd44d91108ec35c9 (patch) | |
tree | 689f62d6aedff5177cbb201a00f5742136ef6ec2 | |
parent | fe2ef0b2cda0b25c45bd9e320f8b77931ee8ef2e (diff) | |
download | vim-git-577bd85d55f30019c890ec80fd44d91108ec35c9.tar.gz |
patch 8.2.4054: Vim9 script test failsv8.2.4054
Problem: Vim9 script test fails.
Solution: Add missing change.
-rw-r--r-- | src/version.c | 2 | ||||
-rw-r--r-- | src/vim9compile.c | 12 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/version.c b/src/version.c index 6ab7271c9..7d080c40b 100644 --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 4054, +/**/ 4053, /**/ 4052, diff --git a/src/vim9compile.c b/src/vim9compile.c index 993bb1c68..963c05200 100644 --- a/src/vim9compile.c +++ b/src/vim9compile.c @@ -541,7 +541,19 @@ get_script_item_idx(int sid, char_u *name, int check_writable, cctx_T *cctx) ht = &SCRIPT_VARS(sid); di = find_var_in_ht(ht, 0, name, TRUE); if (di == NULL) + { + if (si->sn_autoload_prefix != NULL) + { + hashitem_T *hi; + + // A variable exported from an autoload script is in the global + // variables, we can find it in the all_vars table. + hi = hash_find(&si->sn_all_vars.dv_hashtab, name); + if (!HASHITEM_EMPTY(hi)) + return HI2SAV(hi)->sav_var_vals_idx; + } return -2; + } // Now find the svar_T index in sn_var_vals. for (idx = 0; idx < si->sn_var_vals.ga_len; ++idx) |