diff options
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r-- | src/nvim/window.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c index 0f6aa3b2d5..d659f60e66 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -2596,8 +2596,10 @@ int win_close(win_T *win, bool free_buf, bool force) reset_synblock(win); } - // 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; } |