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 -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20220506202516.1F6D21C03B1%40moolenaar.net.

Raspunde prin e-mail lui