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 -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20211023113459.3B8C6C80054%40moolenaar.net.