Patch 9.0.0403
Problem: 'equalalways' may be off when 'laststatus' is zero.
Solution: call last_status() before win_equal(). (Luuk van Baal,
closes #11070)
Files: src/window.c, src/testdir/test_window_cmd.vim
*** ../vim-9.0.0402/src/window.c 2022-08-31 17:48:05.711547579 +0100
--- src/window.c 2022-09-07 14:31:28.168707859 +0100
***************
*** 2712,2717 ****
--- 2712,2725 ----
// using the window.
check_cursor();
}
+
+ /*
+ * If last window has a status line now and we don't want one, remove the
+ * status line. Do this before win_equal(), because it may change the
+ * height of a window
+ */
+ last_status(FALSE);
+
if (p_ea && (*p_ead == 'b' || *p_ead == dir))
// If the frame of the closed window contains the new current window,
// only resize that frame. Otherwise resize all windows.
***************
*** 2741,2752 ****
--dont_parse_messages;
#endif
- /*
- * If last window has a status line now and we don't want one,
- * remove the status line.
- */
- last_status(FALSE);
-
// After closing the help window, try restoring the window layout from
// before it was opened.
if (help_window)
--- 2749,2754 ----
*** ../vim-9.0.0402/src/testdir/test_window_cmd.vim 2022-09-02 21:55:45.511049444 +0100
--- src/testdir/test_window_cmd.vim 2022-09-07 14:42:03.571862366 +0100
***************
*** 1617,1620 ****
--- 1617,1635 ----
tabonly
endfunc
+ func Test_win_equal_last_status()
+ let save_lines = &lines
+ set lines=20
+ set splitbelow
+ set laststatus=0
+
+ split | split | quit
+ call assert_equal(winheight(1), winheight(2))
+
+ let &lines = save_lines
+ set splitbelow&
+ set laststatus&
+ endfunc
+
+
" vim: shiftwidth=2 sts=2 expandtab
*** ../vim-9.0.0402/src/version.c 2022-09-07 14:13:27.574136878 +0100
--- src/version.c 2022-09-07 14:38:00.768199201 +0100
***************
*** 705,706 ****
--- 705,708 ----
{ /* Add new patch number below this line */
+ /**/
+ 403,
/**/
--
hundred-and-one symptoms of being an internet addict:
28. You have comandeered your teenager's phone line for the net and even his
friends know not to call on his line anymore.
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///