forked from aniani/vim
patch 8.2.1851: Vim9: "!" followed by space incorrectly used
Problem: Vim9: "!" followed by space incorrectly used. Solution: Skip over trailing spaces. (closes #7131)
This commit is contained in:
@@ -3041,7 +3041,7 @@ apply_leader(typval_T *rettv, int numeric_only, char_u *start, char_u **end)
|
||||
++p;
|
||||
break;
|
||||
}
|
||||
else
|
||||
else if (*p == '!')
|
||||
{
|
||||
int v = tv2bool(rettv);
|
||||
|
||||
@@ -3178,12 +3178,13 @@ compile_leader(cctx_T *cctx, int numeric_only, char_u *start, char_u **end)
|
||||
}
|
||||
else
|
||||
{
|
||||
int invert = TRUE;
|
||||
int invert = *p == '!';
|
||||
|
||||
while (p > start && p[-1] == '!')
|
||||
while (p > start && (p[-1] == '!' || VIM_ISWHITE(p[-1])))
|
||||
{
|
||||
if (p[-1] == '!')
|
||||
invert = !invert;
|
||||
--p;
|
||||
invert = !invert;
|
||||
}
|
||||
if (generate_2BOOL(cctx, invert) == FAIL)
|
||||
return FAIL;
|
||||
|
Reference in New Issue
Block a user