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/eval.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/eval.c')
-rw-r--r-- | src/eval.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/src/eval.c b/src/eval.c index 5d93b7e50c..d0957a145b 100644 --- a/src/eval.c +++ b/src/eval.c @@ -29,22 +29,6 @@ */ static int current_copyID = 0; -/* - * Info used by a ":for" loop. - */ -typedef struct -{ - int fi_semicolon; // TRUE if ending in '; var]' - int fi_varcount; // nr of variables in the list - int fi_break_count; // nr of line breaks encountered - listwatch_T fi_lw; // keep an eye on the item used. - list_T *fi_list; // list being used - int fi_bi; // index of blob - blob_T *fi_blob; // blob being used - char_u *fi_string; // copy of string being used - int fi_byte_idx; // byte index in fi_string -} forinfo_T; - static int eval2(char_u **arg, typval_T *rettv, evalarg_T *evalarg); static int eval3(char_u **arg, typval_T *rettv, evalarg_T *evalarg); static int eval4(char_u **arg, typval_T *rettv, evalarg_T *evalarg); @@ -1914,7 +1898,8 @@ next_for_item(void *fi_void, char_u *arg) ? (ASSIGN_FINAL // first round: error if variable exists | (fi->fi_bi == 0 ? 0 : ASSIGN_DECL) - | ASSIGN_NO_MEMBER_TYPE) + | ASSIGN_NO_MEMBER_TYPE + | ASSIGN_UPDATE_BLOCK_ID) : 0); listitem_T *item; int skip_assign = in_vim9script() && arg[0] == '_' |