To: vim_dev@googlegroups.com Subject: Patch 8.2.3559 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ 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 -- Bram@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 ///