diff src/list.c @ 21552:cbc570e66d11 v8.2.1326

patch 8.2.1326: Vim9: skipping over white space after list Commit: https://github.com/vim/vim/commit/9d489566815d7913afc5dfc2a772bacede3970fb Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jul 30 20:08:50 2020 +0200 patch 8.2.1326: Vim9: skipping over white space after list 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.
author Bram Moolenaar <Bram@vim.org>
date Thu, 30 Jul 2020 20:15:05 +0200
parents 8d1d11afd8c8
children 963913d80284
line wrap: on
line diff
--- a/src/list.c
+++ b/src/list.c
@@ -1199,7 +1199,7 @@ eval_list(char_u **arg, typval_T *rettv,
 	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);