mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.4896: expression in command block does not look after NL
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)
This commit is contained in:
@@ -2175,7 +2175,8 @@ eval_next_non_blank(char_u *arg, evalarg_T *evalarg, int *getnext)
|
|||||||
*getnext = FALSE;
|
*getnext = FALSE;
|
||||||
if (in_vim9script()
|
if (in_vim9script()
|
||||||
&& evalarg != NULL
|
&& evalarg != NULL
|
||||||
&& (evalarg->eval_cookie != NULL || evalarg->eval_cctx != NULL)
|
&& (evalarg->eval_cookie != NULL || evalarg->eval_cctx != NULL
|
||||||
|
|| *p == NL)
|
||||||
&& (*p == NUL || *p == NL
|
&& (*p == NUL || *p == NL
|
||||||
|| (vim9_comment_start(p) && VIM_ISWHITE(p[-1]))))
|
|| (vim9_comment_start(p) && VIM_ISWHITE(p[-1]))))
|
||||||
{
|
{
|
||||||
|
@@ -705,6 +705,11 @@ func Test_usercmd_with_block()
|
|||||||
END
|
END
|
||||||
call v9.CheckScriptSuccess(lines)
|
call v9.CheckScriptSuccess(lines)
|
||||||
call assert_equal('true', g:result)
|
call assert_equal('true', g:result)
|
||||||
|
unlet g:result
|
||||||
|
|
||||||
|
call feedkeys(":EchoCond\<CR>", 'xt')
|
||||||
|
call assert_equal('true', g:result)
|
||||||
|
|
||||||
delcommand EchoCond
|
delcommand EchoCond
|
||||||
unlet g:result
|
unlet g:result
|
||||||
|
|
||||||
|
@@ -746,6 +746,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
4896,
|
||||||
/**/
|
/**/
|
||||||
4895,
|
4895,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user