0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 9.0.0156: giving E1170 only in an expression is confusing

Problem:    Giving E1170 only in an expression is confusing.
Solution:   Give E1170 for any "#{ comment". (closes #10855)
This commit is contained in:
Bram Moolenaar
2022-08-06 18:12:06 +01:00
parent db9b96d844
commit 3f74c0ab32
6 changed files with 24 additions and 14 deletions

View File

@@ -2842,8 +2842,14 @@ parse_command_modifiers(
if (eap->nextcmd != NULL)
++eap->nextcmd;
}
if (vim9script && has_cmdmod(cmod, FALSE))
*errormsg = _(e_command_modifier_without_command);
if (vim9script)
{
if (has_cmdmod(cmod, FALSE))
*errormsg = _(e_command_modifier_without_command);
if (eap->cmd[0] == '#' && eap->cmd[1] == '{'
&& eap->cmd[2] != '{')
*errormsg = _(e_cannot_use_hash_curly_to_start_comment);
}
return FAIL;
}
if (*eap->cmd == NUL)