comparison 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
comparison
equal deleted inserted replaced
21551:24c7210c4134 21552:cbc570e66d11
1197 1197
1198 // the comma must come after the value 1198 // the comma must come after the value
1199 had_comma = **arg == ','; 1199 had_comma = **arg == ',';
1200 if (had_comma) 1200 if (had_comma)
1201 { 1201 {
1202 if (vim9script && (*arg)[1] != NUL && !VIM_ISWHITE((*arg)[1])) 1202 if (vim9script && !IS_WHITE_OR_NUL((*arg)[1]))
1203 { 1203 {
1204 semsg(_(e_white_after), ","); 1204 semsg(_(e_white_after), ",");
1205 goto failret; 1205 goto failret;
1206 } 1206 }
1207 *arg = skipwhite(*arg + 1); 1207 *arg = skipwhite(*arg + 1);
1229 if (evaluate) 1229 if (evaluate)
1230 list_free(l); 1230 list_free(l);
1231 return FAIL; 1231 return FAIL;
1232 } 1232 }
1233 1233
1234 *arg = skipwhite(*arg + 1); 1234 *arg += 1;
1235 if (evaluate) 1235 if (evaluate)
1236 rettv_list_set(rettv, l); 1236 rettv_list_set(rettv, l);
1237 1237
1238 return OK; 1238 return OK;
1239 } 1239 }