]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0581: After maximizing and deleting the quickfix buffer, window height... v9.2.0581
authorYegappan Lakshmanan <yegappan@yahoo.com>
Sun, 31 May 2026 21:38:30 +0000 (21:38 +0000)
committerChristian Brabandt <cb@256bit.org>
Sun, 31 May 2026 21:38:30 +0000 (21:38 +0000)
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 <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/buffer.c
src/testdir/test_quickfix.vim
src/version.c

index 07176fbc434ac80debcda5a6a93a784758f401df..d28718329318f3179db7f267a3a83c185b7b70f6 100644 (file)
@@ -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);
index c656d205f029ebf82bd2051936ecb56adeaaee53..b0c4475ccd383e1a987f1f3bdb8b9305fba9428a 100644 (file)
@@ -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
index e39f67aad73c8cf52ca4ff5208d91244a3a0cb76..44bc20abdcf81197286815af5923bd2dce5fa1d2 100644 (file)
@@ -729,6 +729,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    581,
 /**/
     580,
 /**/