summaryrefslogtreecommitdiffstats
path: root/src/autocmd.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-11-20 10:38:25 +0000
committerBram Moolenaar <Bram@vim.org>2021-11-20 10:38:25 +0000
commitb8e642f7ace5382b4dacb7a8effd86f22b828cc1 (patch)
treec4b232393cacf2583f7c0ec88c17e2f60710f56a /src/autocmd.c
parent2de9b7c7c8791da8853a9a7ca9c467867465b655 (diff)
patch 8.2.3626: "au! event" cannot be followed by another commandv8.2.3626
Problem: "au!" and "au! event" cannot be followed by another command as documented. Solution: When a bar is found set nextcmd.
Diffstat (limited to 'src/autocmd.c')
-rw-r--r--src/autocmd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/autocmd.c b/src/autocmd.c
index 14cd4af592..ac21196b9a 100644
--- a/src/autocmd.c
+++ b/src/autocmd.c
@@ -845,6 +845,7 @@ do_autocmd(exarg_T *eap, char_u *arg_in, int forceit)
if (*arg == '|')
{
+ eap->nextcmd = arg + 1;
arg = (char_u *)"";
group = AUGROUP_ALL; // no argument, use all groups
}
@@ -869,6 +870,7 @@ do_autocmd(exarg_T *eap, char_u *arg_in, int forceit)
pat = skipwhite(pat);
if (*pat == '|')
{
+ eap->nextcmd = pat + 1;
pat = (char_u *)"";
cmd = (char_u *)"";
}