Skip to content

Commit c481ad3

Browse files
zeertzjqbrammool
authored andcommitted
patch 9.0.1401: condition is always true
Problem: Condition is always true. Solution: Remove the condition. (closes #12139)
1 parent 5145c9a commit c481ad3

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

src/eval.c

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6885,20 +6885,17 @@ handle_subscript(
68856885
*arg = skipwhite(p + 2);
68866886
else
68876887
*arg = p + 2;
6888-
if (ret == OK)
6888+
if (VIM_ISWHITE(**arg))
68896889
{
6890-
if (VIM_ISWHITE(**arg))
6891-
{
6892-
emsg(_(e_no_white_space_allowed_before_parenthesis));
6893-
ret = FAIL;
6894-
}
6895-
else if ((**arg == '{' && !in_vim9script()) || **arg == '(')
6896-
// expr->{lambda}() or expr->(lambda)()
6897-
ret = eval_lambda(arg, rettv, evalarg, verbose);
6898-
else
6899-
// expr->name()
6900-
ret = eval_method(arg, rettv, evalarg, verbose);
6890+
emsg(_(e_no_white_space_allowed_before_parenthesis));
6891+
ret = FAIL;
69016892
}
6893+
else if ((**arg == '{' && !in_vim9script()) || **arg == '(')
6894+
// expr->{lambda}() or expr->(lambda)()
6895+
ret = eval_lambda(arg, rettv, evalarg, verbose);
6896+
else
6897+
// expr->name()
6898+
ret = eval_method(arg, rettv, evalarg, verbose);
69026899
}
69036900
// "." is ".name" lookup when we found a dict or when evaluating and
69046901
// scriptversion is at least 2, where string concatenation is "..".

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,8 @@ static char *(features[]) =
695695

696696
static int included_patches[] =
697697
{ /* Add new patch number below this line */
698+
/**/
699+
1401,
698700
/**/
699701
1400,
700702
/**/

0 commit comments

Comments
 (0)