summaryrefslogtreecommitdiff
path: root/src/testdir/test_winbuf_close.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-05-04 20:15:38 +0200
committerBram Moolenaar <Bram@vim.org>2018-05-04 20:15:38 +0200
commitc136af29c0b1939076fbae7d36afd90dce740315 (patch)
tree8513e2fab04112190824d6cd2f308a01acbe58f6 /src/testdir/test_winbuf_close.vim
parent606cb8b08ed510962fcdc8ef1abcc1fe35fbffef (diff)
downloadvim-git-c136af29c0b1939076fbae7d36afd90dce740315.tar.gz
patch 8.0.1790: 'winfixwidth' is not always respected by :closev8.0.1790
Problem: 'winfixwidth' is not always respected by :close. Solution: Prefer a frame without 'winfixwidth' or 'winfixheight'. (Jason Franklin)
Diffstat (limited to 'src/testdir/test_winbuf_close.vim')
-rw-r--r--src/testdir/test_winbuf_close.vim36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/testdir/test_winbuf_close.vim b/src/testdir/test_winbuf_close.vim
index ed64dd79b..e4618610c 100644
--- a/src/testdir/test_winbuf_close.vim
+++ b/src/testdir/test_winbuf_close.vim
@@ -122,3 +122,39 @@ func Test_winbuf_close()
call delete('Xtest2')
call delete('Xtest3')
endfunc
+
+" Test that ":close" will respect 'winfixheight' when possible.
+func Test_winfixheight_on_close()
+ set nosplitbelow nosplitright
+
+ split | split | vsplit
+
+ $wincmd w
+ setlocal winfixheight
+ let l:height = winheight(0)
+
+ 3close
+
+ call assert_equal(l:height, winheight(0))
+
+ %bwipeout!
+ setlocal nowinfixheight splitbelow& splitright&
+endfunc
+
+" Test that ":close" will respect 'winfixwidth' when possible.
+func Test_winfixwidth_on_close()
+ set nosplitbelow nosplitright
+
+ vsplit | vsplit | split
+
+ $wincmd w
+ setlocal winfixwidth
+ let l:width = winwidth(0)
+
+ 3close
+
+ call assert_equal(l:width, winwidth(0))
+
+ %bwipeout!
+ setlocal nowinfixwidth splitbelow& splitright&
+endfunction