summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_autocmd.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/testdir/test_autocmd.vim')
-rw-r--r--src/testdir/test_autocmd.vim12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/testdir/test_autocmd.vim b/src/testdir/test_autocmd.vim
index 90dc3c1d32..f4e3c15a61 100644
--- a/src/testdir/test_autocmd.vim
+++ b/src/testdir/test_autocmd.vim
@@ -4441,4 +4441,16 @@ func Test_autocmd_invalidates_undo_on_textchanged()
call StopVimInTerminal(buf)
endfunc
+func Test_autocmd_creates_new_buffer_on_bufleave()
+ e a.txt
+ e b.txt
+ setlocal bufhidden=wipe
+ autocmd BufLeave <buffer> diffsplit c.txt
+ bn
+ call assert_equal(1, winnr('$'))
+ call assert_equal('a.txt', bufname('%'))
+ bw a.txt
+ bw c.txt
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab