forked from aniani/vim
patch 8.2.3312: Vim9: after "if false" line breaks in expression not skipped
Problem: Vim9: after "if false" line breaks in expression not skipped. Solution: Do parse the expression. (closes #8723)
This commit is contained in:
@@ -2372,6 +2372,14 @@ def Test_if_const_expr()
|
|||||||
if false
|
if false
|
||||||
burp
|
burp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# expression with line breaks skipped
|
||||||
|
if false
|
||||||
|
('aaa'
|
||||||
|
.. 'bbb'
|
||||||
|
.. 'ccc'
|
||||||
|
)->setline(1)
|
||||||
|
endif
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
def Test_if_const_expr_fails()
|
def Test_if_const_expr_fails()
|
||||||
|
@@ -755,6 +755,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 */
|
||||||
|
/**/
|
||||||
|
3312,
|
||||||
/**/
|
/**/
|
||||||
3311,
|
3311,
|
||||||
/**/
|
/**/
|
||||||
|
@@ -9730,14 +9730,12 @@ compile_def_function(
|
|||||||
|
|
||||||
if (p == ea.cmd && ea.cmdidx != CMD_SIZE)
|
if (p == ea.cmd && ea.cmdidx != CMD_SIZE)
|
||||||
{
|
{
|
||||||
if (cctx.ctx_skip == SKIP_YES)
|
if (cctx.ctx_skip == SKIP_YES && ea.cmdidx != CMD_eval)
|
||||||
{
|
{
|
||||||
line += STRLEN(line);
|
line += STRLEN(line);
|
||||||
goto nextline;
|
goto nextline;
|
||||||
}
|
}
|
||||||
|
else if (ea.cmdidx != CMD_eval)
|
||||||
// Expression or function call.
|
|
||||||
if (ea.cmdidx != CMD_eval)
|
|
||||||
{
|
{
|
||||||
// CMD_var cannot happen, compile_assignment() above would be
|
// CMD_var cannot happen, compile_assignment() above would be
|
||||||
// used. Most likely an assignment to a non-existing variable.
|
// used. Most likely an assignment to a non-existing variable.
|
||||||
|
Reference in New Issue
Block a user