diff src/testdir/test_mksession.vim @ 24106:3b5d499c2bb5 v8.2.2594

patch 8.2.2594: alternate buffer added to session file even when it's hidden Commit: https://github.com/vim/vim/commit/0756f757edba755b75e0c9c612ab2f7e673def84 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Mar 13 13:52:33 2021 +0100 patch 8.2.2594: alternate buffer added to session file even when it's hidden Problem: Alternate buffer added to session file even when it's hidden. Solution: Check the 'buflisted' option. (closes https://github.com/vim/vim/issues/7951)
author Bram Moolenaar <Bram@vim.org>
date Sat, 13 Mar 2021 14:00:04 +0100
parents a2f13e56b0e7
children c2a234e8c896
line wrap: on
line diff
--- a/src/testdir/test_mksession.vim
+++ b/src/testdir/test_mksession.vim
@@ -544,6 +544,20 @@ func Test_mkview_no_balt()
   %bwipe
 endfunc
 
+func Test_mksession_no_balt()
+  edit Xtestfile1
+  edit Xtestfile2
+
+  bdelete Xtestfile1
+  mksession! Xtestview
+
+  source Xtestview
+  call assert_equal(0, buflisted('Xtestfile1'))
+
+  call delete('Xtestview')
+  %bwipe
+endfunc
+
 " Test :mkview with a file argument.
 func Test_mkview_file()
   " Create a view with line number and a fold.