From c5c8a821341b71ae29786c97df7930a9581f7ab7 Mon Sep 17 00:00:00 2001 From: Grzegorz Milka Date: Sun, 23 Oct 2016 00:25:16 +0200 Subject: vim-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. https://github.com/vim/vim/commit/11fbc2866ccc11b4dd1726abdaf582a78ef3f743 --- src/nvim/testdir/test_tabpage.vim | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/nvim/testdir/test_tabpage.vim') diff --git a/src/nvim/testdir/test_tabpage.vim b/src/nvim/testdir/test_tabpage.vim index f1c41e967b..7bdea0b186 100644 --- a/src/nvim/testdir/test_tabpage.vim +++ b/src/nvim/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 tabnext + q + + while tabpagenr('$') > 1 + quit + endwhile +endfunc + + " vim: shiftwidth=2 sts=2 expandtab -- cgit