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
committerzeertzjq <zeertzjq@outlook.com>2022-03-13 13:17:28 +0800
commit163ec00f44c99b08a932144164b8c467ec672c3c (patch)
treef5bb1fda21c79a160f422a58fd92a177ff27d1a7 /src/nvim/window.c
parent6c26ab71ceb9f4f12c55492ba7ab33a5e61af079 (diff)
downloadrneovim-163ec00f44c99b08a932144164b8c467ec672c3c.tar.gz
rneovim-163ec00f44c99b08a932144164b8c467ec672c3c.tar.bz2
rneovim-163ec00f44c99b08a932144164b8c467ec672c3c.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.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c
index f80f1f1a65..0f6aa3b2d5 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -2596,6 +2596,11 @@ 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)) {
+ win->w_buffer->b_p_bl = false;
+ }
+
/*
* Close the link to the buffer.
*/