vim-patch:8.2.3626: "au! event" cannot be followed by another command

Problem:    "au!" and "au! event" cannot be followed by another command as
            documented.
Solution:   When a bar is found set nextcmd.

b8e642f7ac

Cherry-pick do_autocmd() "eap" argument from patch 8.2.3268.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq
2022-11-07 19:50:51 +08:00
parent a6f972cb6a
commit 609c0513ca
3 changed files with 10 additions and 5 deletions

View File

@@ -4231,7 +4231,7 @@ static void ex_autocmd(exarg_T *eap)
secure = 2;
eap->errmsg = _(e_curdir);
} else if (eap->cmdidx == CMD_autocmd) {
do_autocmd(eap->arg, eap->forceit);
do_autocmd(eap, eap->arg, eap->forceit);
} else {
do_augroup(eap->arg, eap->forceit);
}