Patch 8.2.1069

3 views
Skip to first unread message

Bram Moolenaar

unread,
Jun 27, 2020, 10:36:43 AM6/27/20
to vim...@googlegroups.com

Patch 8.2.1069
Problem: Vim9: fail to check for white space in list.
Solution: Add check for white space.
Files: src/list.c


*** ../vim-8.2.1068/src/list.c 2020-06-26 22:46:23.233370940 +0200
--- src/list.c 2020-06-27 14:10:11.955524573 +0200
***************
*** 1168,1173 ****
--- 1168,1174 ----
list_T *l = NULL;
typval_T tv;
listitem_T *item;
+ int vim9script = current_sctx.sc_version == SCRIPT_VERSION_VIM9;
int had_comma;

if (evaluate)
***************
*** 1198,1207 ****
clear_tv(&tv);
}

! // the comma must comma after the value
had_comma = **arg == ',';
if (had_comma)
*arg = skipwhite(*arg + 1);

// the "]" can be on the next line
eval_next_non_blank(*arg, evalarg, &getnext);
--- 1199,1215 ----
clear_tv(&tv);
}

! // the comma must come after the value
had_comma = **arg == ',';
if (had_comma)
+ {
+ if (vim9script && (*arg)[1] != NUL && !VIM_ISWHITE((*arg)[1]))
+ {
+ semsg(_(e_white_after), ",");
+ goto failret;
+ }
*arg = skipwhite(*arg + 1);
+ }

// the "]" can be on the next line
eval_next_non_blank(*arg, evalarg, &getnext);
*** ../vim-8.2.1068/src/version.c 2020-06-27 14:11:50.494644105 +0200
--- src/version.c 2020-06-27 14:53:09.713773683 +0200
***************
*** 756,757 ****
--- 756,759 ----
{ /* Add new patch number below this line */
+ /**/
+ 1069,
/**/

--
No children may attend school with their breath smelling of "wild onions."
[real standing law in West Virginia, United States of America]

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages