diff src/testdir/test_tabpage.vim @ 10082:7fc6103c6651 v7.4.2312

commit https://github.com/vim/vim/commit/5a49789a9b1f6447aeafbbbdd5b235dd10c471d5 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Sep 3 16:29:04 2016 +0200 patch 7.4.2312 Problem: Crash when autocommand moves to another tab. (Dominique Pelle) Solution: When navigating to another window halfway the :edit command go back to the right window.
author Christian Brabandt <cb@256bit.org>
date Sat, 03 Sep 2016 16:30:06 +0200
parents bc30991c3e98
children 13304dccb96e
line wrap: on
line diff
--- a/src/testdir/test_tabpage.vim
+++ b/src/testdir/test_tabpage.vim
@@ -218,7 +218,7 @@ function Test_tabpage_with_tab_modifier(
   bw!
 endfunction
 
-func Test_tabnext_on_buf_unload()
+func Test_tabnext_on_buf_unload1()
   " This once caused a crash
   new
   tabedit
@@ -227,7 +227,19 @@ func Test_tabnext_on_buf_unload()
   q
 
   while tabpagenr('$') > 1
-    quit
+    bwipe!
+  endwhile
+endfunc
+
+func Test_tabnext_on_buf_unload2()
+  " This once caused a crash
+  tabedit
+  autocmd BufUnload <buffer> tabnext
+  file x
+  edit y
+
+  while tabpagenr('$') > 1
+    bwipe!
   endwhile
 endfunc