1
0
forked from aniani/vim

patch 8.2.3297: cannot use all commands inside a {} block

Problem:    Cannot use all commands inside a {} block after :command and
            :autocmd.
Solution:   Do consider \n to separate commands. (closes #8620)
This commit is contained in:
Bram Moolenaar
2021-08-05 20:40:03 +02:00
parent af647e76ca
commit 63b9173693
16 changed files with 90 additions and 36 deletions

View File

@@ -450,7 +450,7 @@ ex_sort(exarg_T *eap)
unique = TRUE;
else if (*p == '"') // comment start
break;
else if (check_nextcmd(p) != NULL)
else if (eap->nextcmd == NULL && check_nextcmd(p) != NULL)
{
eap->nextcmd = check_nextcmd(p);
break;
@@ -3930,7 +3930,7 @@ ex_substitute(exarg_T *eap)
cmd = skipwhite(cmd);
if (*cmd && *cmd != '"') // if not end-of-line or comment
{
eap->nextcmd = check_nextcmd(cmd);
set_nextcmd(eap, cmd);
if (eap->nextcmd == NULL)
{
semsg(_(e_trailing_arg), cmd);