summaryrefslogtreecommitdiff
path: root/src/list.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-07-30 22:14:33 +0200
committerBram Moolenaar <Bram@vim.org>2020-07-30 22:14:33 +0200
commit4d4d1cd5c8b61ef0296bd6190ca2a0b2d6d96ba7 (patch)
tree0d7e06a252e1f6ba2b97c86b163b5fc8954b117b /src/list.c
parentf4ee528086dcff2b8744544c440853f177956261 (diff)
downloadvim-git-8.2.1328.tar.gz
patch 8.2.1328: no space allowed before comma in listv8.2.1328
Problem: No space allowed before comma in list. Solution: Legacy Vim script allows it. (closes #6577)
Diffstat (limited to 'src/list.c')
-rw-r--r--src/list.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/list.c b/src/list.c
index 5c2f60ef7..14a31bcfb 100644
--- a/src/list.c
+++ b/src/list.c
@@ -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 == ',';