diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-09-14 00:30:51 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-09-14 00:30:51 +0100 |
commit | 766ae5b252eaa6ee2bff70f1913d1cbfb51101bd (patch) | |
tree | c8e34f8e495b00c7e36e9310ab5becb5f9924ecc /src/evalvars.c | |
parent | 353b68a99189875a8460124d44fc33eae6def74e (diff) |
patch 9.0.0460: loop variable can't be foundv9.0.0460
Problem: Loop variable can't be found.
Solution: Adjust block_id of the loop variable each round.
Diffstat (limited to 'src/evalvars.c')
-rw-r--r-- | src/evalvars.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/evalvars.c b/src/evalvars.c index 7de785bc4b..e4cf40945a 100644 --- a/src/evalvars.c +++ b/src/evalvars.c @@ -3851,6 +3851,14 @@ set_var_const( } clear_tv(&di->di_tv); + + if ((flags & ASSIGN_UPDATE_BLOCK_ID) + && SCRIPT_ID_VALID(current_sctx.sc_sid)) + { + scriptitem_T *si = SCRIPT_ITEM(current_sctx.sc_sid); + + update_script_var_block_id(name, si->sn_current_block_id); + } } else { |