mirror of
https://github.com/vim/vim.git
synced 2025-09-28 04:24:06 -04:00
patch 8.2.3559: loop variable recreated every time
Problem: Loop variable recreated every time. Solution: Keep the loop variable when looping.
This commit is contained in:
@@ -1191,8 +1191,9 @@ ex_while(exarg_T *eap)
|
|||||||
& CSF_FUNC_DEF;
|
& CSF_FUNC_DEF;
|
||||||
|
|
||||||
// Any variables defined in the previous round are no longer
|
// Any variables defined in the previous round are no longer
|
||||||
// visible.
|
// visible. Keep the first one, it is the loop variable that
|
||||||
for (i = cstack->cs_script_var_len[cstack->cs_idx];
|
// we reuse every time around.
|
||||||
|
for (i = cstack->cs_script_var_len[cstack->cs_idx] + 1;
|
||||||
i < si->sn_var_vals.ga_len; ++i)
|
i < si->sn_var_vals.ga_len; ++i)
|
||||||
{
|
{
|
||||||
svar_T *sv = ((svar_T *)si->sn_var_vals.ga_data) + i;
|
svar_T *sv = ((svar_T *)si->sn_var_vals.ga_data) + i;
|
||||||
|
@@ -757,6 +757,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
3559,
|
||||||
/**/
|
/**/
|
||||||
3558,
|
3558,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user