From b5acf6e0c1aedd68ec3423a45c7bf30599832708 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Fri, 2 Feb 2018 20:44:46 +0100 Subject: vim-patch:8.0.0700: segfault with QuitPre autocommand closes the window Problem: Segfault with QuitPre autocommand closes the window. (Marek) Solution: Check that the window pointer is still valid. (Christian Brabandt, closes vim/vim#1817) https://github.com/vim/vim/commit/0ea5070d79c8a13fb2403280a72f968495b0fab7 --- src/nvim/testdir/test_tabpage.vim | 18 ++++++++++++++++++ 1 file changed, 18 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 33139fcda0..51f2477209 100644 --- a/src/nvim/testdir/test_tabpage.vim +++ b/src/nvim/testdir/test_tabpage.vim @@ -473,5 +473,23 @@ func Test_tabnext_on_buf_unload2() endwhile endfunc +func Test_close_on_quitpre() + " This once caused a crash + new + only + set bufhidden=delete + au QuitPre close + tabnew tab1 + tabnew tab2 + 1tabn + q! + call assert_equal(1, tabpagenr()) + call assert_equal(2, tabpagenr('$')) + " clean up + while tabpagenr('$') > 1 + bwipe! + endwhile + 1b +endfunc " vim: shiftwidth=2 sts=2 expandtab -- cgit From 348193f49c45c5ba74ce367a7fa192308f50e746 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sat, 3 Feb 2018 12:09:37 +0100 Subject: vim-patch:8.0.1222: test functions interfere with each other Problem: Test functions interfere with each other. Solution: Cleanup tab pages, windows and buffers. Reset option. https://github.com/vim/vim/commit/ce11de87e26e1420703242f8e07b4fd69c4032ba --- src/nvim/testdir/test_tabpage.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (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 51f2477209..180563ebbd 100644 --- a/src/nvim/testdir/test_tabpage.vim +++ b/src/nvim/testdir/test_tabpage.vim @@ -475,6 +475,7 @@ endfunc func Test_close_on_quitpre() " This once caused a crash + edit Xtest new only set bufhidden=delete @@ -489,7 +490,7 @@ func Test_close_on_quitpre() while tabpagenr('$') > 1 bwipe! endwhile - 1b + buf Xtest endfunc " vim: shiftwidth=2 sts=2 expandtab -- cgit