0
0
mirror of https://github.com/vim/vim.git synced 2025-07-04 23:07:33 -04:00

patch 9.0.1401: condition is always true

Problem:    Condition is always true.
Solution:   Remove the condition. (closes #12139)
This commit is contained in:
zeertzjq 2023-03-11 16:18:51 +00:00 committed by Bram Moolenaar
parent 5145c9a829
commit c481ad38f0
2 changed files with 11 additions and 12 deletions

View File

@ -6885,20 +6885,17 @@ handle_subscript(
*arg = skipwhite(p + 2);
else
*arg = p + 2;
if (ret == OK)
if (VIM_ISWHITE(**arg))
{
if (VIM_ISWHITE(**arg))
{
emsg(_(e_no_white_space_allowed_before_parenthesis));
ret = FAIL;
}
else if ((**arg == '{' && !in_vim9script()) || **arg == '(')
// expr->{lambda}() or expr->(lambda)()
ret = eval_lambda(arg, rettv, evalarg, verbose);
else
// expr->name()
ret = eval_method(arg, rettv, evalarg, verbose);
emsg(_(e_no_white_space_allowed_before_parenthesis));
ret = FAIL;
}
else if ((**arg == '{' && !in_vim9script()) || **arg == '(')
// expr->{lambda}() or expr->(lambda)()
ret = eval_lambda(arg, rettv, evalarg, verbose);
else
// expr->name()
ret = eval_method(arg, rettv, evalarg, verbose);
}
// "." is ".name" lookup when we found a dict or when evaluating and
// scriptversion is at least 2, where string concatenation is "..".

View File

@ -695,6 +695,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1401,
/**/
1400,
/**/