Mercurial > vim
comparison src/vim9script.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 | 99a7eb1881c7 |
children | 9d54c8e6c682 |
comparison
equal
deleted
inserted
replaced
29618:ad8fa115e062 | 29619:842690841d50 |
---|---|
181 * understand errors. | 181 * understand errors. |
182 */ | 182 */ |
183 int | 183 int |
184 vim9_bad_comment(char_u *p) | 184 vim9_bad_comment(char_u *p) |
185 { | 185 { |
186 if (p[0] == '#' && p[1] == '{' && p[2] != '{') | 186 if (!did_emsg && p[0] == '#' && p[1] == '{' && p[2] != '{') |
187 { | 187 { |
188 emsg(_(e_cannot_use_hash_curly_to_start_comment)); | 188 emsg(_(e_cannot_use_hash_curly_to_start_comment_in_an_expression)); |
189 return TRUE; | 189 return TRUE; |
190 } | 190 } |
191 return FALSE; | 191 return FALSE; |
192 } | 192 } |
193 #endif | 193 #endif |