aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-06-25 06:43:26 +0200
committerJames McCoy <jamessan@jamessan.com>2017-08-16 10:39:50 -0400
commitf0a9b7ff637b1c33988b8ec20530657ba71644fc (patch)
treed981bdfbb92ba6e8c0cd67e1263b5139f9c8e536 /src/nvim/testdir
parent30cb66e8ba520d4564189ff763b5859e3d80581f (diff)
downloadrneovim-f0a9b7ff637b1c33988b8ec20530657ba71644fc.tar.gz
rneovim-f0a9b7ff637b1c33988b8ec20530657ba71644fc.tar.bz2
rneovim-f0a9b7ff637b1c33988b8ec20530657ba71644fc.zip
vim-patch:8.0.0678 closing a window does not trigger resizing
Closes #6748 Problem: When 'equalalways' is set and closing a window in a separate frame, not all window sizes are adjusted. (Glacambre) Solution: Resize all windows if the new current window is not in the same frame as the closed window. (closes vim/vim#1707) https://github.com/vim/vim/commit/8eeeba8c025ff844e6514c4a60cec11bf1fc1b35
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_window_cmd.vim44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_window_cmd.vim b/src/nvim/testdir/test_window_cmd.vim
index 188a7ed0f3..9d61921988 100644
--- a/src/nvim/testdir/test_window_cmd.vim
+++ b/src/nvim/testdir/test_window_cmd.vim
@@ -336,6 +336,50 @@ func Test_window_width()
bw Xa Xb Xc
endfunc
+func Test_equalalways_on_close()
+ set equalalways
+ vsplit
+ windo split
+ split
+ wincmd J
+ " now we have a frame top-left with two windows, a frame top-right with two
+ " windows and a frame at the bottom, full-width.
+ let height_1 = winheight(1)
+ let height_2 = winheight(2)
+ let height_3 = winheight(3)
+ let height_4 = winheight(4)
+ " closing the bottom window causes all windows to be resized.
+ close
+ call assert_notequal(height_1, winheight(1))
+ call assert_notequal(height_2, winheight(2))
+ call assert_notequal(height_3, winheight(3))
+ call assert_notequal(height_4, winheight(4))
+ call assert_equal(winheight(1), winheight(3))
+ call assert_equal(winheight(2), winheight(4))
+
+ 1wincmd w
+ split
+ 4wincmd w
+ resize + 5
+ " left column has three windows, equalized heights.
+ " right column has two windows, top one a bit higher
+ let height_1 = winheight(1)
+ let height_2 = winheight(2)
+ let height_4 = winheight(4)
+ let height_5 = winheight(5)
+ 3wincmd w
+ " closing window in left column equalizes heights in left column but not in
+ " the right column
+ close
+ call assert_notequal(height_1, winheight(1))
+ call assert_notequal(height_2, winheight(2))
+ call assert_equal(height_4, winheight(3))
+ call assert_equal(height_5, winheight(4))
+
+ only
+ set equalalways&
+endfunc
+
func Test_window_jump_tag()
help
/iccf