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)
diff --git a/src/window.c b/src/window.c
index 4050ed0..47fb815 100644
--- a/src/window.c
+++ b/src/window.c
@@ -2433,8 +2433,10 @@
#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