forked from aniani/vim
patch 8.2.3405: cannot have a comment line in a {} block of a user command
Problem: Cannot have a comment line in a {} block of a user command. Solution: Continue after the line break. (closes #8837)
This commit is contained in:
@@ -2807,7 +2807,16 @@ parse_command_modifiers(
|
||||
|
||||
// ignore comment and empty lines
|
||||
if (comment_start(eap->cmd, starts_with_colon))
|
||||
{
|
||||
// a comment ends at a NL
|
||||
if (eap->nextcmd == NULL)
|
||||
{
|
||||
eap->nextcmd = vim_strchr(eap->cmd, '\n');
|
||||
if (eap->nextcmd != NULL)
|
||||
++eap->nextcmd;
|
||||
}
|
||||
return FAIL;
|
||||
}
|
||||
if (*eap->cmd == NUL)
|
||||
{
|
||||
if (!skip_only)
|
||||
|
Reference in New Issue
Block a user