patch 8.2.2420: too many problems with using all autocommand events
Problem: Too many problems with using all autocommand events.
Solution: Disallow defining an autocommand for all events.
diff --git a/src/testdir/test_quickfix.vim b/src/testdir/test_quickfix.vim
index 8667631..1799f29 100644
--- a/src/testdir/test_quickfix.vim
+++ b/src/testdir/test_quickfix.vim
@@ -3833,7 +3833,7 @@
sv Xtest
augroup QF_Test
au!
- au * * bw
+ au QuickFixCmdPre,QuickFixCmdPost,BufEnter,BufLeave * bw
augroup END
lbuffer
augroup QF_Test
@@ -3845,7 +3845,7 @@
func Test_lexpr_crash()
augroup QF_Test
au!
- au * * call setloclist(0, [], 'f')
+ au QuickFixCmdPre,QuickFixCmdPost,BufEnter,BufLeave * call setloclist(0, [], 'f')
augroup END
lexpr ""
augroup QF_Test
@@ -3880,7 +3880,7 @@
sv Xtest
augroup QF_Test
au!
- au * * call setloclist(0, [], 'f')
+ au QuickFixCmdPre,QuickFixCmdPost,BufEnter,BufLeave * call setloclist(0, [], 'f')
augroup END
lvimgrep quickfix test_quickfix.vim
augroup QF_Test
@@ -4215,7 +4215,7 @@
new
new
augroup nasty
- au * * bwipe
+ au QuickFixCmdPre,QuickFixCmdPost,BufEnter,BufLeave * bwipe
augroup END
lbuffer
augroup nasty
@@ -4228,9 +4228,9 @@
func Xexpr_acmd_freelist(cchar)
call s:setup_commands(a:cchar)
- " This was using freed memory.
+ " This was using freed memory (but with what events?)
augroup nasty
- au * * call g:Xsetlist([], 'f')
+ au QuickFixCmdPre,QuickFixCmdPost,BufEnter,BufLeave * call g:Xsetlist([], 'f')
augroup END
Xexpr "x"
augroup nasty