summaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-05-06 21:24:31 +0100
committerBram Moolenaar <Bram@vim.org>2022-05-06 21:24:31 +0100
commita13e7acba9928a9c5e97be28946418d8d4323988 (patch)
tree1b78684d3b7e785eacf48a4a7e9a971519dfa6a5 /src/eval.c
parentd88934406c5375d88f8f1b65331c9f0cab68cc6c (diff)
patch 8.2.4896: expression in command block does not look after NLv8.2.4896
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)
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c
index 18e196f443..317446c762 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -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]))))
{