summaryrefslogtreecommitdiffstats
path: root/src/vim9compile.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 07:39:57 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 07:40:16 +0000
commit6af24b2457752c0d36aaf9f29f03d39afd09937f (patch)
tree2671b594908d1f971de6b2a2d473f97dfb7291d2 /src/vim9compile.c
parentReleasing progress-linux version 2:9.1.0016-1~progress7.99u1. (diff)
downloadvim-6af24b2457752c0d36aaf9f29f03d39afd09937f.tar.xz
vim-6af24b2457752c0d36aaf9f29f03d39afd09937f.zip
Merging upstream version 2:9.1.0199.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/vim9compile.c')
-rw-r--r--src/vim9compile.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/vim9compile.c b/src/vim9compile.c
index d6faa7b..8f67d8a 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -2285,7 +2285,17 @@ compile_load_lhs_with_index(lhs_T *lhs, char_u *var_start, cctx_T *cctx)
if (dot - var_start == 4 && STRNCMP(var_start, "this", 4) == 0)
{
// load "this"
- if (generate_LOAD(cctx, ISN_LOAD, 0, NULL, lhs->lhs_type) == FAIL)
+ lvar_T *lvar = lhs->lhs_lvar;
+ int rc;
+
+ if (lvar->lv_from_outer > 0)
+ rc = generate_LOADOUTER(cctx, lvar->lv_idx,
+ lvar->lv_from_outer, lvar->lv_loop_depth,
+ lvar->lv_loop_idx, type);
+ else
+ rc = generate_LOAD(cctx, ISN_LOAD, lvar->lv_idx, NULL, type);
+
+ if (rc == FAIL)
return FAIL;
}
else