comparison src/testdir/test_window_cmd.vim @ 11591:d06a3db9b651 v8.0.0678

patch 8.0.0678: closing a window does not trigger resizing commit https://github.com/vim/vim/commit/8eeeba8c025ff844e6514c4a60cec11bf1fc1b35 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jun 25 22:45:39 2017 +0200 patch 8.0.0678: closing a window does not trigger resizing 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 #1707)
author Christian Brabandt <cb@256bit.org>
date Sun, 25 Jun 2017 23:00:03 +0200
parents e6140f3d2be7
children 7d7835ab8b37
comparison
equal deleted inserted replaced
11590:db5109d9c5da 11591:d06a3db9b651
316 call assert_inrange(ww3, ww3 + 1, ww2) 316 call assert_inrange(ww3, ww3 + 1, ww2)
317 317
318 bw Xa Xb Xc 318 bw Xa Xb Xc
319 endfunc 319 endfunc
320 320
321 func Test_equalalways_on_close()
322 set equalalways
323 vsplit
324 windo split
325 split
326 wincmd J
327 " now we have a frame top-left with two windows, a frame top-right with two
328 " windows and a frame at the bottom, full-width.
329 let height_1 = winheight(1)
330 let height_2 = winheight(2)
331 let height_3 = winheight(3)
332 let height_4 = winheight(4)
333 " closing the bottom window causes all windows to be resized.
334 close
335 call assert_notequal(height_1, winheight(1))
336 call assert_notequal(height_2, winheight(2))
337 call assert_notequal(height_3, winheight(3))
338 call assert_notequal(height_4, winheight(4))
339 call assert_equal(winheight(1), winheight(3))
340 call assert_equal(winheight(2), winheight(4))
341
342 1wincmd w
343 split
344 4wincmd w
345 resize + 5
346 " left column has three windows, equalized heights.
347 " right column has two windows, top one a bit higher
348 let height_1 = winheight(1)
349 let height_2 = winheight(2)
350 let height_4 = winheight(4)
351 let height_5 = winheight(5)
352 3wincmd w
353 " closing window in left column equalizes heights in left column but not in
354 " the right column
355 close
356 call assert_notequal(height_1, winheight(1))
357 call assert_notequal(height_2, winheight(2))
358 call assert_equal(height_4, winheight(3))
359 call assert_equal(height_5, winheight(4))
360
361 only
362 set equalalways&
363 endfunc
364
321 func Test_window_jump_tag() 365 func Test_window_jump_tag()
322 help 366 help
323 /iccf 367 /iccf
324 call assert_match('^|iccf|', getline('.')) 368 call assert_match('^|iccf|', getline('.'))
325 call assert_equal(2, winnr('$')) 369 call assert_equal(2, winnr('$'))