1
0
forked from aniani/vim

patch 8.2.1326: Vim9: skipping over white space after list

Problem:    Vim9: skipping over white space after list.
Solution:   Do not skip white space, a following [] would be misinterpreted.
            (closes #6552)  Fix a few side effects.
This commit is contained in:
Bram Moolenaar
2020-07-30 20:08:50 +02:00
parent ea2d8d2571
commit 9d48956681
11 changed files with 62 additions and 37 deletions

View File

@@ -1199,7 +1199,7 @@ eval_list(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int do_error)
had_comma = **arg == ',';
if (had_comma)
{
if (vim9script && (*arg)[1] != NUL && !VIM_ISWHITE((*arg)[1]))
if (vim9script && !IS_WHITE_OR_NUL((*arg)[1]))
{
semsg(_(e_white_after), ",");
goto failret;
@@ -1231,7 +1231,7 @@ failret:
return FAIL;
}
*arg = skipwhite(*arg + 1);
*arg += 1;
if (evaluate)
rettv_list_set(rettv, l);