aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/quickfix.c
diff options
context:
space:
mode:
authorYorick Peterse <yorick@yorickpeterse.com>2021-06-26 16:44:05 +0200
committerGitHub <noreply@github.com>2021-06-26 10:44:05 -0400
commit5c0b01fd887ff5043e196a0e21f03d547e65a98b (patch)
tree7fc62f2ef0d18d9b5847e016c4aff86f8ada90e5 /src/nvim/quickfix.c
parent20dc3f1989dca8aa9b64970f3799e4f48ac080c8 (diff)
downloadrneovim-5c0b01fd887ff5043e196a0e21f03d547e65a98b.tar.gz
rneovim-5c0b01fd887ff5043e196a0e21f03d547e65a98b.tar.bz2
rneovim-5c0b01fd887ff5043e196a0e21f03d547e65a98b.zip
vim-patch:8.2.3018: 'quickfixtextfunc' formatting is lost when switching buffers (#14865)
Problem: Formatting using quickfixtextfunc is lost when updating location lists for different buffers. (Yorick Peterse) Solution: Use the right window for the locaiton list. (Yegappan Lakshmanan, closes vim/vim#8400, closes vim/vim#8403) https://github.com/vim/vim/commit/ad52f96a2d3169cb1b915c1d4a6ba26ba6e5bd0a
Diffstat (limited to 'src/nvim/quickfix.c')
-rw-r--r--src/nvim/quickfix.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c
index 3e8d623ed4..71624baaf4 100644
--- a/src/nvim/quickfix.c
+++ b/src/nvim/quickfix.c
@@ -3925,7 +3925,15 @@ static void qf_update_buffer(qf_info_T *qi, qfline_T *old_last)
int qf_winid = 0;
if (IS_LL_STACK(qi)) {
- qf_winid = curwin->handle;
+ if (curwin->w_llist == qi) {
+ win = curwin;
+ } else {
+ win = qf_find_win_with_loclist(qi);
+ if (win == NULL) {
+ return;
+ }
+ }
+ qf_winid = (int)win->handle;
}
if (old_last == NULL) {