0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

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:
Bram Moolenaar
2020-10-15 21:54:56 +02:00
parent a604ccc959
commit 27491cd3ef
4 changed files with 28 additions and 6 deletions

View File

@@ -3390,10 +3390,14 @@ eval7_leader(
f = rettv->vval.v_float;
else
#endif
{
while (VIM_ISWHITE(end_leader[-1]))
--end_leader;
if (in_vim9script() && end_leader[-1] == '!')
val = tv2bool(rettv);
else
val = tv_get_number_chk(rettv, &error);
}
if (error)
{
clear_tv(rettv);