0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -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:
Bram Moolenaar
2022-05-06 21:24:31 +01:00
parent d88934406c
commit a13e7acba9
3 changed files with 9 additions and 1 deletions

View File

@@ -2175,7 +2175,8 @@ eval_next_non_blank(char_u *arg, evalarg_T *evalarg, int *getnext)
*getnext = FALSE;
if (in_vim9script()
&& evalarg != NULL
&& (evalarg->eval_cookie != NULL || evalarg->eval_cctx != NULL)
&& (evalarg->eval_cookie != NULL || evalarg->eval_cctx != NULL
|| *p == NL)
&& (*p == NUL || *p == NL
|| (vim9_comment_start(p) && VIM_ISWHITE(p[-1]))))
{