diff src/testdir/test_tabpage.vim @ 10076:bc30991c3e98 v7.4.2309

commit https://github.com/vim/vim/commit/11fbc2866ccc11b4dd1726abdaf582a78ef3f743 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Sep 2 21:48:32 2016 +0200 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.
author Christian Brabandt <cb@256bit.org>
date Fri, 02 Sep 2016 22:00:07 +0200
parents e1a8b2601fe0
children 7fc6103c6651
line wrap: on
line diff
--- 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