patch 8.1.0060: crash when autocommands delete the current buffer
Problem: Crash when autocommands delete the current buffer. (Dominique
Pelle)
Solution: Check that autocommands don't change the buffer.
diff --git a/src/testdir/test_quickfix.vim b/src/testdir/test_quickfix.vim
index c3850ce..eade52f 100644
--- a/src/testdir/test_quickfix.vim
+++ b/src/testdir/test_quickfix.vim
@@ -3350,3 +3350,15 @@
call assert_equal('Errors', w:quickfix_title)
cclose
endfunc
+
+func Test_lbuffer_with_bwipe()
+ new
+ new
+ augroup nasty
+ au * * bwipe
+ augroup END
+ lbuffer
+ augroup nasty
+ au!
+ augroup END
+endfunc