Patch 8.2.3696

4 views
Skip to first unread message

Bram Moolenaar

unread,
Nov 29, 2021, 11:02:23 AM11/29/21
to vim...@googlegroups.com

Patch 8.2.3696
Problem: Vim9: error for invalid assignment when skipping.
Solution: Do not check white space when skipping. (closes #9243)
Files: src/evalvars.c, src/testdir/test_vim9_assign.vim


*** ../vim-8.2.3695/src/evalvars.c 2021-11-28 19:53:34.038422762 +0000
--- src/evalvars.c 2021-11-29 15:52:47.710108228 +0000
***************
*** 881,887 ****
else
++expr;

! if (vim9script && (!VIM_ISWHITE(*argend)
|| !IS_WHITE_OR_NUL(*expr)))
{
vim_strncpy(op, expr - len, len);
--- 881,887 ----
else
++expr;

! if (vim9script && !eap->skip && (!VIM_ISWHITE(*argend)
|| !IS_WHITE_OR_NUL(*expr)))
{
vim_strncpy(op, expr - len, len);
*** ../vim-8.2.3695/src/testdir/test_vim9_assign.vim 2021-11-26 17:36:48.012799185 +0000
--- src/testdir/test_vim9_assign.vim 2021-11-29 16:01:28.376755818 +0000
***************
*** 1854,1859 ****
--- 1854,1865 ----
'var ll = [1, 2]',
'unlet ll[0: 1]',
], 'E1004:', 2)
+ # command recognized as assignment when skipping, should not give an error
+ CheckScriptSuccess([
+ 'vim9script',
+ 'for i in []',
+ " put =''",
+ 'endfor'])

CheckDefFailure([
'var ll = [1, 2]',
*** ../vim-8.2.3695/src/version.c 2021-11-29 13:44:52.456955927 +0000
--- src/version.c 2021-11-29 15:53:45.553956649 +0000
***************
*** 759,760 ****
--- 759,762 ----
{ /* Add new patch number below this line */
+ /**/
+ 3696,
/**/

--
SOLDIER: Where did you get the coconuts?
ARTHUR: Through ... We found them.
SOLDIER: Found them? In Mercea. The coconut's tropical!
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

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