diff src/window.c @ 16019:096b8ccd855e v8.1.1015

patch 8.1.1015: quickfix buffer shows up in list, can't get buffer number commit https://github.com/vim/vim/commit/647e24ba3dbf7ff448aa471b1a659a18267ae056 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Mar 17 16:39:46 2019 +0100 patch 8.1.1015: quickfix buffer shows up in list, can't get buffer number Problem: Quickfix buffer shows up in list, can't get buffer number. Solution: Make the quickfix buffer unlisted when the quickfix window is closed. get the quickfix buffer number with getqflist(). (Yegappan Lakshmanan, closes #4113)
author Bram Moolenaar <Bram@vim.org>
date Sun, 17 Mar 2019 16:45:11 +0100
parents 7fbdceabad64
children a3284dd27de6
line wrap: on
line diff
--- a/src/window.c
+++ b/src/window.c
@@ -2382,18 +2382,24 @@ win_close(win_T *win, int free_buf)
     }
 
 #ifdef FEAT_GUI
-    /* Avoid trouble with scrollbars that are going to be deleted in
-     * win_free(). */
+    // Avoid trouble with scrollbars that are going to be deleted in
+    // win_free().
     if (gui.in_use)
 	out_flush();
 #endif
 
 #ifdef FEAT_SYN_HL
-    /* Free independent synblock before the buffer is freed. */
+    // Free independent synblock before the buffer is freed.
     if (win->w_buffer != NULL)
 	reset_synblock(win);
 #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))
+	win->w_buffer->b_p_bl = FALSE;
+#endif
+
     /*
      * Close the link to the buffer.
      */