diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-07-30 20:08:50 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-07-30 20:08:50 +0200 |
commit | 9d489566815d7913afc5dfc2a772bacede3970fb (patch) | |
tree | eff105e7214186b0a4bf31296d06d7d89926935a /src/dict.c | |
parent | ea2d8d25718836bf627b67b7fcd28a1e528bb7b9 (diff) |
patch 8.2.1326: Vim9: skipping over white space after listv8.2.1326
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.
Diffstat (limited to 'src/dict.c')
-rw-r--r-- | src/dict.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/dict.c b/src/dict.c index eedaf42686..019227f105 100644 --- a/src/dict.c +++ b/src/dict.c @@ -838,6 +838,10 @@ 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 + // previously, so only require it in Vim9 script. + if (!vim9script) + *arg = skipwhite(*arg); if (**arg != ':') { if (evaluate) |