Patch 8.2.3559
Problem: Loop variable recreated every time.
Solution: Keep the loop variable when looping.
Files: src/ex_eval.c
*** ../vim-8.2.3558/src/ex_eval.c 2021-10-06 22:08:07.913476179 +0100
--- src/ex_eval.c 2021-10-14 23:33:14.507940085 +0100
***************
*** 1191,1198 ****
& CSF_FUNC_DEF;
// Any variables defined in the previous round are no longer
! // visible.
! for (i = cstack->cs_script_var_len[cstack->cs_idx];
i < si->sn_var_vals.ga_len; ++i)
{
svar_T *sv = ((svar_T *)si->sn_var_vals.ga_data) + i;
--- 1191,1199 ----
& CSF_FUNC_DEF;
// Any variables defined in the previous round are no longer
! // visible. Keep the first one, it is the loop variable that
! // we reuse every time around.
! for (i = cstack->cs_script_var_len[cstack->cs_idx] + 1;
i < si->sn_var_vals.ga_len; ++i)
{
svar_T *sv = ((svar_T *)si->sn_var_vals.ga_data) + i;
*** ../vim-8.2.3558/src/version.c 2021-10-23 10:25:17.141873927 +0100
--- src/version.c 2021-10-23 12:06:58.654927253 +0100
***************
*** 759,760 ****
--- 759,762 ----
{ /* Add new patch number below this line */
+ /**/
+ 3559,
/**/
--
Get a life? What is the URL where it can be downloaded?
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///