0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

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)
This commit is contained in:
Bram Moolenaar
2022-08-06 11:35:28 +01:00
parent 5ac4b1a24e
commit 25f40af9d2
5 changed files with 13 additions and 4 deletions

View File

@@ -183,9 +183,9 @@ not_in_vim9(exarg_T *eap)
int
vim9_bad_comment(char_u *p)
{
if (p[0] == '#' && p[1] == '{' && p[2] != '{')
if (!did_emsg && p[0] == '#' && p[1] == '{' && p[2] != '{')
{
emsg(_(e_cannot_use_hash_curly_to_start_comment));
emsg(_(e_cannot_use_hash_curly_to_start_comment_in_an_expression));
return TRUE;
}
return FALSE;