aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-07-30 09:19:44 -0400
committerGitHub <noreply@github.com>2021-07-30 09:19:44 -0400
commitca3071ea93368621e3665a8aa75e2e95e839a1c1 (patch)
treeaf8620849739a4ab47e8d71336e7f1d2fd5db7f6 /src/nvim/testdir
parent74a38c03c0e1d0668d3cdcf32e706da2a6332efb (diff)
parent96a6b9b52d93732fc39664e202470a65da6012b3 (diff)
downloadrneovim-ca3071ea93368621e3665a8aa75e2e95e839a1c1.tar.gz
rneovim-ca3071ea93368621e3665a8aa75e2e95e839a1c1.tar.bz2
rneovim-ca3071ea93368621e3665a8aa75e2e95e839a1c1.zip
Merge pull request #15062 from seandewar/vim-8.1.0829
vim-patch:8.1.0829: when 'hidden' is set session creates extra buffers
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_mksession.vim23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_mksession.vim b/src/nvim/testdir/test_mksession.vim
index 4026f2bf98..fbe764bbf2 100644
--- a/src/nvim/testdir/test_mksession.vim
+++ b/src/nvim/testdir/test_mksession.vim
@@ -287,6 +287,29 @@ func Test_mksession_blank_windows()
call delete('Xtest_mks.out')
endfunc
+func Test_mksession_buffer_count()
+ set hidden
+
+ " Edit exactly three files in the current session.
+ %bwipe!
+ e Xfoo | tabe Xbar | tabe Xbaz
+ tabdo write
+ mksession! Xtest_mks.out
+
+ " Verify that loading the session does not create additional buffers.
+ %bwipe!
+ source Xtest_mks.out
+ call assert_equal(3, len(getbufinfo()))
+
+ " Clean up.
+ call delete('Xfoo')
+ call delete('Xbar')
+ call delete('Xbaz')
+ call delete('Xtest_mks.out')
+ %bwipe!
+ set hidden&
+endfunc
+
if has('extra_search')
func Test_mksession_hlsearch()