forked from aniani/vim
patch 8.1.2168: heredoc assignment not skipped in if block
Problem: Heredoc assignment not skipped in if block. Solution: Check if "skip" is set. (closes #5063)
This commit is contained in:
parent
2559a47823
commit
b1ba9abcb3
@ -756,10 +756,13 @@ ex_let_const(exarg_T *eap, int is_const)
|
|||||||
if (l != NULL)
|
if (l != NULL)
|
||||||
{
|
{
|
||||||
rettv_list_set(&rettv, l);
|
rettv_list_set(&rettv, l);
|
||||||
op[0] = '=';
|
if (!eap->skip)
|
||||||
op[1] = NUL;
|
{
|
||||||
(void)ex_let_vars(eap->arg, &rettv, FALSE, semicolon, var_count,
|
op[0] = '=';
|
||||||
|
op[1] = NUL;
|
||||||
|
(void)ex_let_vars(eap->arg, &rettv, FALSE, semicolon, var_count,
|
||||||
is_const, op);
|
is_const, op);
|
||||||
|
}
|
||||||
clear_tv(&rettv);
|
clear_tv(&rettv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -295,4 +295,12 @@ E
|
|||||||
app
|
app
|
||||||
END
|
END
|
||||||
call assert_equal(['something', 'app'], var1)
|
call assert_equal(['something', 'app'], var1)
|
||||||
|
|
||||||
|
let check = []
|
||||||
|
if 0
|
||||||
|
let check =<< trim END
|
||||||
|
from heredoc
|
||||||
|
END
|
||||||
|
endif
|
||||||
|
call assert_equal([], check)
|
||||||
endfunc
|
endfunc
|
||||||
|
@ -753,6 +753,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 */
|
||||||
|
/**/
|
||||||
|
2168,
|
||||||
/**/
|
/**/
|
||||||
2167,
|
2167,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user