summaryrefslogtreecommitdiffstats
path: root/src/vim9compile.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-07-08 18:38:08 +0200
committerBram Moolenaar <Bram@vim.org>2020-07-08 18:38:08 +0200
commit6b7a0a8c201bbace7e69fe0709f72b95092193df (patch)
tree86a4bf66437397f57fe4e59ffc9fc63e7e122b90 /src/vim9compile.c
parentb335b29e1c3428fd475026412297d5aa63b623e6 (diff)
patch 8.2.1159: Vim9: no error for missing space after a commav8.2.1159
Problem: Vim9: no error for missing space after a comma. Solution: Check for white space.
Diffstat (limited to 'src/vim9compile.c')
-rw-r--r--src/vim9compile.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 07aacb37c0..0aae8f2138 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -3060,7 +3060,14 @@ compile_list(char_u **arg, cctx_T *cctx)
break;
++count;
if (*p == ',')
+ {
++p;
+ if (*p != ']' && !IS_WHITE_OR_NUL(*p))
+ {
+ semsg(_(e_white_after), ",");
+ return FAIL;
+ }
+ }
whitep = p;
p = skipwhite(p);
}