aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/window.c
diff options
context:
space:
mode:
authorluukvbaal <31730729+luukvbaal@users.noreply.github.com>2022-09-07 18:08:00 +0200
committerGitHub <noreply@github.com>2022-09-07 18:08:00 +0200
commitead524656dc1664622f80509a983519a190ca48a (patch)
tree572a162e04a2b06e7777c1481f1b47cc3e1a7184 /src/nvim/window.c
parent4dc4cf346755375e49410e16635c00a602b26c36 (diff)
downloadrneovim-ead524656dc1664622f80509a983519a190ca48a.tar.gz
rneovim-ead524656dc1664622f80509a983519a190ca48a.tar.bz2
rneovim-ead524656dc1664622f80509a983519a190ca48a.zip
vim-patch:9.0.0403: 'equalalways' may be off when 'laststatus' is zero (#20109)
Problem: 'equalalways' may be off when 'laststatus' is zero. Solution: call last_status() before win_equal(). (Luuk van Baal, closes https://github.com/vim/vim/pull/11070) https://github.com/vim/vim/commit/fd7e60a33ddd83a82da4eb6267f1c12fa926f32b
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r--src/nvim/window.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c
index a6cc53080b..63a6eb9fb6 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -2849,6 +2849,11 @@ int win_close(win_T *win, bool free_buf, bool force)
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 (!was_floating) {
if (!curwin->w_floating && p_ea && (*p_ead == 'b' || *p_ead == dir)) {
// If the frame of the closed window contains the new current window,
@@ -2870,10 +2875,6 @@ int win_close(win_T *win, bool free_buf, bool force)
split_disallowed--;
- // 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) {