diff src/window.c @ 26458:824fe105f5b9 v8.2.3759

patch 8.2.3759: quickfix buffer becomes hidden while still in a window Commit: https://github.com/vim/vim/commit/78a61068cf2c83e611d954a0fb413a09ad59dc07 Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Wed Dec 8 20:03:31 2021 +0000 patch 8.2.3759: quickfix buffer becomes hidden while still in a window Problem: Quickfix buffer becomes hidden while still in a window. Solution: Check if the closed window is the last window showing the quickfix buffer. (Yegappan Lakshmanan, closes #9303, closes #9300)
author Bram Moolenaar <Bram@vim.org>
date Wed, 08 Dec 2021 21:15:03 +0100
parents 7606d9b13068
children 2fc13817b100
line wrap: on
line diff
--- a/src/window.c
+++ b/src/window.c
@@ -2433,8 +2433,10 @@ win_close_buffer(win_T *win, int action,
 #endif
 
 #ifdef FEAT_QUICKFIX
-    // When the quickfix/location list window is closed, unlist the buffer.
-    if (win->w_buffer != NULL && bt_quickfix(win->w_buffer))
+    // When a quickfix/location list window is closed and the buffer is
+    // displayed in only one window, then unlist the buffer.
+    if (win->w_buffer != NULL && bt_quickfix(win->w_buffer)
+					&& win->w_buffer->b_nwindows == 1)
 	win->w_buffer->b_p_bl = FALSE;
 #endif