patch 9.0.0403: 'equalalways' may be off when 'laststatus' is zero
Problem: 'equalalways' may be off when 'laststatus' is zero.
Solution: call last_status() before win_equal(). (Luuk van Baal,
closes #11070)
diff --git a/src/window.c b/src/window.c
index 3632735..ff55a3b 100644
--- a/src/window.c
+++ b/src/window.c
@@ -2712,6 +2712,14 @@
// 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,12 +2749,6 @@
--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)