diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-07-30 22:14:33 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-07-30 22:14:33 +0200 |
commit | 4d4d1cd5c8b61ef0296bd6190ca2a0b2d6d96ba7 (patch) | |
tree | 0d7e06a252e1f6ba2b97c86b163b5fc8954b117b /src/dict.c | |
parent | f4ee528086dcff2b8744544c440853f177956261 (diff) | |
download | vim-git-4d4d1cd5c8b61ef0296bd6190ca2a0b2d6d96ba7.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/dict.c')
-rw-r--r-- | src/dict.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/dict.c b/src/dict.c index 019227f10..af1e1e9c8 100644 --- a/src/dict.c +++ b/src/dict.c @@ -838,7 +838,7 @@ eval_dict(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int literal) : eval1(arg, &tvkey, evalarg)) == FAIL) // recursive! goto failret; - // The colon should come right after the key, but this wasn't checked + // the colon should come right after the key, but this wasn't checked // previously, so only require it in Vim9 script. if (!vim9script) *arg = skipwhite(*arg); @@ -895,7 +895,10 @@ eval_dict(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int literal) } clear_tv(&tvkey); - // the comma must come after the value + // the comma should come right after the value, but this wasn't checked + // previously, so only require it in Vim9 script. + if (!vim9script) + *arg = skipwhite(*arg); had_comma = **arg == ','; if (had_comma) { |