1
0
forked from aniani/vim

patch 8.2.1328: no space allowed before comma in list

Problem:    No space allowed before comma in list.
Solution:   Legacy Vim script allows it. (closes #6577)
This commit is contained in:
Bram Moolenaar
2020-07-30 22:14:33 +02:00
parent f4ee528086
commit 4d4d1cd5c8
4 changed files with 17 additions and 2 deletions

View File

@@ -1194,6 +1194,9 @@ eval_list(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int do_error)
else
clear_tv(&tv);
}
// Legacy Vim script allowed a space before the comma.
if (!vim9script)
*arg = skipwhite(*arg);
// the comma must come after the value
had_comma = **arg == ',';