aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/window.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-10-10 15:42:25 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-10-10 22:58:39 -0400
commit4cd69151cf39cd4c3f083da2275f17206dcf5bc3 (patch)
tree00cf5ebb0af8dd177d8ba3f43619c3c5a3b534ed /src/nvim/window.c
parent9606317486416aeba590d44fd9fcc955834d1e3b (diff)
downloadrneovim-4cd69151cf39cd4c3f083da2275f17206dcf5bc3.tar.gz
rneovim-4cd69151cf39cd4c3f083da2275f17206dcf5bc3.tar.bz2
rneovim-4cd69151cf39cd4c3f083da2275f17206dcf5bc3.zip
vim-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 vim/vim#4113) https://github.com/vim/vim/commit/647e24ba3dbf7ff448aa471b1a659a18267ae056
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r--src/nvim/window.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c
index e53570edd8..7d08336c25 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -2578,9 +2578,14 @@ int win_close(win_T *win, bool free_buf)
return OK;
}
- /* Free independent synblock before the buffer is freed. */
- if (win->w_buffer != NULL)
+ // Free independent synblock before the buffer is freed.
+ if (win->w_buffer != NULL) {
reset_synblock(win);
+ }
+ // 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;
+ }
/*
* Close the link to the buffer.