Patch 8.2.4896

3 views
Skip to first unread message

Bram Moolenaar

unread,
May 6, 2022, 4:25:20 PM5/6/22
to vim...@googlegroups.com

Patch 8.2.4896 (after 8.2.4869)
Problem: Expression in command block does not look after NL when command is
typed.
Solution: Skip over NL also when not in a script. (closes #10358)
Files: src/eval.c, src/testdir/test_usercommands.vim


*** ../vim-8.2.4895/src/eval.c 2022-05-06 13:14:43.789076617 +0100
--- src/eval.c 2022-05-06 21:22:47.818588202 +0100
***************
*** 2175,2181 ****
*getnext = FALSE;
if (in_vim9script()
&& evalarg != NULL
! && (evalarg->eval_cookie != NULL || evalarg->eval_cctx != NULL)
&& (*p == NUL || *p == NL
|| (vim9_comment_start(p) && VIM_ISWHITE(p[-1]))))
{
--- 2175,2182 ----
*getnext = FALSE;
if (in_vim9script()
&& evalarg != NULL
! && (evalarg->eval_cookie != NULL || evalarg->eval_cctx != NULL
! || *p == NL)
&& (*p == NUL || *p == NL
|| (vim9_comment_start(p) && VIM_ISWHITE(p[-1]))))
{
*** ../vim-8.2.4895/src/testdir/test_usercommands.vim 2022-05-05 12:20:24.359225499 +0100
--- src/testdir/test_usercommands.vim 2022-05-06 21:22:19.410603449 +0100
***************
*** 705,710 ****
--- 705,715 ----
END
call v9.CheckScriptSuccess(lines)
call assert_equal('true', g:result)
+ unlet g:result
+
+ call feedkeys(":EchoCond\<CR>", 'xt')
+ call assert_equal('true', g:result)
+
delcommand EchoCond
unlet g:result

*** ../vim-8.2.4895/src/version.c 2022-05-06 20:38:41.672040950 +0100
--- src/version.c 2022-05-06 21:19:58.366678938 +0100
***************
*** 748,749 ****
--- 748,751 ----
{ /* Add new patch number below this line */
+ /**/
+ 4896,
/**/

--
hundred-and-one symptoms of being an internet addict:
121. You ask for e-mail adresses instead of telephone numbers.

/// 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