diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-10-18 17:05:54 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-10-18 17:05:54 +0100 |
commit | 8f3c3c6cd044e3b5bf08dbfa3b3f04bb3f711bad (patch) | |
tree | 66e5f78b1f4d346156a3fdc958c14fbd3b614f7b /src/testdir/test_autocmd.vim | |
parent | 61c4b04799bf114cadc3bbf212ae8b2ad22a6980 (diff) |
patch 9.0.0789: dummy buffer ends up in a windowv9.0.0789
Problem: Dummy buffer ends up in a window.
Solution: Disallow navigating to a dummy buffer.
Diffstat (limited to 'src/testdir/test_autocmd.vim')
-rw-r--r-- | src/testdir/test_autocmd.vim | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/testdir/test_autocmd.vim b/src/testdir/test_autocmd.vim index 0706e73070..6ba1b02dff 100644 --- a/src/testdir/test_autocmd.vim +++ b/src/testdir/test_autocmd.vim @@ -3857,4 +3857,24 @@ func Test_autocmd_delete() call assert_true(autocmd_delete([test_null_dict()])) endfunc +func Test_autocmd_split_dummy() + " Autocommand trying to split a window containing a dummy buffer. + auto BufReadPre * exe "sbuf " .. expand("<abuf>") + " Avoid the "W11" prompt + au FileChangedShell * let v:fcs_choice = 'reload' + func Xautocmd_changelist() + cal writefile(['Xtestfile2:4:4'], 'Xerr') + edit Xerr + lex 'Xtestfile2:4:4' + endfunc + call Xautocmd_changelist() + call assert_fails('call Xautocmd_changelist()', 'E86:') + + au! BufReadPre + au! FileChangedShell + delfunc Xautocmd_changelist + bwipe! Xerr + call delete('Xerr') +endfunc + " vim: shiftwidth=2 sts=2 expandtab |