patch 9.2.0581: After maximizing and deleting the quickfix buffer, window height is wrong
Commit:
https://github.com/vim/vim/commit/07f055f5790cd57b83532928d8e74c1eabe45e5f
Author: Yegappan Lakshmanan <
yega...@yahoo.com>
Date: Sun May 31 21:38:30 2026 +0000
patch 9.2.0581: After maximizing and deleting the quickfix buffer, window height is wrong
Problem: After maximizing and deleting the quickfix buffer, window
height is wrong (tertium)
Solution: Reset the winfixheight option when a quickfix buffer is
deleted from a window (Yegappan Lakshmanan)
fixes: #3378
closes: #20403
Signed-off-by: Yegappan Lakshmanan <
yega...@yahoo.com>
Signed-off-by: Christian Brabandt <
c...@256bit.org>
diff --git a/src/buffer.c b/src/buffer.c
index 07176fbc4..d28718329 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -736,6 +736,11 @@ aucmd_abort:
unblock_autocmds();
}
+ // When a quickfix buffer is deleted from a window, clear the
+ // 'winfixheight' option.
+ if (bt_quickfix(buf) && win_valid && win->w_buffer == buf)
+ win->w_p_wfh = FALSE;
+
// Remember if the buffer may be hidden soon, or is already hidden.
hiding_buf = buf->b_nwindows <= 0 || ((win_valid || closed_popup)
&& win->w_buffer == buf && buf->b_nwindows == 1);
diff --git a/src/testdir/test_quickfix.vim b/src/testdir/test_quickfix.vim
index c656d205f..b0c4475cc 100644
--- a/src/testdir/test_quickfix.vim
+++ b/src/testdir/test_quickfix.vim
@@ -7090,4 +7090,20 @@ func Test_set_qftf_in_sandbox()
call Xtest_set_qftf_in_sandbox('l')
endfunc
+" Test for the 'statusline' height remaining at one when the quickfix buffer
+" is wiped out when quickfix window is the only window open.
+func Test_qf_statusline_height()
+ %bw!
+ copen
+ wincmd p
+ let prev_wh = winheight('.')
+ wincmd p
+ only
+ bw!
+ copen
+ wincmd p
+ call assert_equal(prev_wh, winheight('.'))
+ %bw!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/version.c b/src/version.c
index e39f67aad..44bc20abd 100644
--- a/src/version.c
+++ b/src/version.c
@@ -729,6 +729,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 581,
/**/
580,
/**/