0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

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)
This commit is contained in:
Yegappan Lakshmanan
2021-12-08 20:03:31 +00:00
committed by Bram Moolenaar
parent 2172bff364
commit 78a61068cf
4 changed files with 50 additions and 10 deletions

View File

@@ -2433,8 +2433,10 @@ win_close_buffer(win_T *win, int action, int abort_if_last)
#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