summaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-08-06 11:35:28 +0100
committerBram Moolenaar <Bram@vim.org>2022-08-06 11:35:28 +0100
commit25f40af9d2f04d18c8a276249f2794e83aa5c290 (patch)
tree211120fc59c884678f5d27233a85af3401452c83 /src/eval.c
parent5ac4b1a24e3ba52698a0d24b22cdd2e1c7895417 (diff)
patch 9.0.0150: error for using #{ in an expression is a bit confusingv9.0.0150
Problem: Error for using #{ in an expression is a bit confusing. Solution: Mention that this error is only given for an expression. Avoid giving the error more than once. (closes #10855)
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c
index 42b883e9b0..8dfbb8f2a3 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -2157,6 +2157,8 @@ newline_skip_comments(char_u *arg)
break;
p = nl;
}
+ else if (vim9_bad_comment(p))
+ break;
if (*p != NL)
break;
++p; // skip another NL
@@ -2182,7 +2184,10 @@ getline_peek_skip_comments(evalarg_T *evalarg)
break;
p = skipwhite(next);
if (*p != NUL && !vim9_comment_start(p))
+ {
+ (void)vim9_bad_comment(p);
return next;
+ }
if (eval_next_line(NULL, evalarg) == NULL)
break;
}