summaryrefslogtreecommitdiff
path: root/src/list.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-07-30 20:08:50 +0200
committerBram Moolenaar <Bram@vim.org>2020-07-30 20:08:50 +0200
commit9d489566815d7913afc5dfc2a772bacede3970fb (patch)
treeeff105e7214186b0a4bf31296d06d7d89926935a /src/list.c
parentea2d8d25718836bf627b67b7fcd28a1e528bb7b9 (diff)
downloadvim-git-9d489566815d7913afc5dfc2a772bacede3970fb.tar.gz
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/list.c')
-rw-r--r--src/list.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/list.c b/src/list.c
index 9a334ae45..5c2f60ef7 100644
--- a/src/list.c
+++ b/src/list.c
@@ -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);