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 *)""; } diff --git a/src/testdir/test_autocmd.vim b/src/testdir/test_autocmd.vim index 045320e5f5..4bdb8dc22e 100644 --- a/src/testdir/test_autocmd.vim +++ b/src/testdir/test_autocmd.vim @@ -357,17 +357,20 @@ endfunc func Test_early_bar() " test that a bar is recognized before the {event} call s:AddAnAutocmd() - augroup vimBarTest | au! | augroup END + augroup vimBarTest | au! | let done = 77 | augroup END call assert_equal(1, len(split(execute('au vimBarTest'), "\n"))) + call assert_equal(77, done) call s:AddAnAutocmd() - augroup vimBarTest| au!| augroup END + augroup vimBarTest| au!| let done = 88 | augroup END call assert_equal(1, len(split(execute('au vimBarTest'), "\n"))) + call assert_equal(88, done) " test that a bar is recognized after the {event} call s:AddAnAutocmd() - augroup vimBarTest| au!BufReadCmd| augroup END + augroup vimBarTest| au!BufReadCmd| let done = 99 | augroup END call assert_equal(1, len(split(execute('au vimBarTest'), "\n"))) + call assert_equal(99, done) " test that a bar is recognized after the {group} call s:AddAnAutocmd() diff --git a/src/version.c b/src/version.c index 8e84cbb456..c54307e15e 100644 --- a/src/version.c +++ b/src/version.c @@ -757,6 +757,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 3626, /**/ 3625, /**/