diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-09-02 21:48:32 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-09-02 21:48:32 +0200 |
commit | 11fbc2866ccc11b4dd1726abdaf582a78ef3f743 (patch) | |
tree | 1cb5a456cb814c1e9f37c972d2fd7d80e77c2c6c /src/testdir/test_tabpage.vim | |
parent | 44f660c42191062214552f2bdb2e9bcc4e23e6fc (diff) | |
download | vim-11fbc2866ccc11b4dd1726abdaf582a78ef3f743.zip |
patch 7.4.2309
Problem: Crash when doing tabnext in a BufUnload autocmd. (Dominique Pelle)
Solution: When detecting that the tab page changed, don't just abort but
delete the window where w_buffer is NULL.
Diffstat (limited to 'src/testdir/test_tabpage.vim')
-rw-r--r-- | src/testdir/test_tabpage.vim | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/testdir/test_tabpage.vim b/src/testdir/test_tabpage.vim index f1c41e967..7bdea0b18 100644 --- a/src/testdir/test_tabpage.vim +++ b/src/testdir/test_tabpage.vim @@ -218,4 +218,18 @@ function Test_tabpage_with_tab_modifier() bw! endfunction +func Test_tabnext_on_buf_unload() + " This once caused a crash + new + tabedit + tabfirst + au BufUnload <buffer> tabnext + q + + while tabpagenr('$') > 1 + quit + endwhile +endfunc + + " vim: shiftwidth=2 sts=2 expandtab |