Mercurial > vim
diff src/eval.c @ 29619:842690841d50 v9.0.0150
patch 9.0.0150: error for using #{ in an expression is a bit confusing
Commit: https://github.com/vim/vim/commit/25f40af9d2f04d18c8a276249f2794e83aa5c290
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Aug 6 11:35:28 2022 +0100
patch 9.0.0150: error for using #{ in an expression is a bit confusing
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 06 Aug 2022 12:45:03 +0200 |
parents | 949e8978ea43 |
children | 9d54c8e6c682 |
line wrap: on
line diff
--- 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 *ev 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; }