summaryrefslogtreecommitdiff
path: root/src/quickfix.c
diff options
context:
space:
mode:
authorYegappan Lakshmanan <yegappan@yahoo.com>2021-06-19 18:22:53 +0200
committerBram Moolenaar <Bram@vim.org>2021-06-19 18:22:53 +0200
commitad52f96a2d3169cb1b915c1d4a6ba26ba6e5bd0a (patch)
tree380b4c8907b1b63688cca8714914d5e5c2d24950 /src/quickfix.c
parent59b50c3bee908694ae4ac10b26bfebf99d09d466 (diff)
downloadvim-git-ad52f96a2d3169cb1b915c1d4a6ba26ba6e5bd0a.tar.gz
patch 8.2.3018: 'quickfixtextfunc' formatting is lost when switching buffersv8.2.3018
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 #8400, closes #8403)
Diffstat (limited to 'src/quickfix.c')
-rw-r--r--src/quickfix.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/quickfix.c b/src/quickfix.c
index ad07a5b4e..4974cb479 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -4473,7 +4473,17 @@ qf_update_buffer(qf_info_T *qi, qfline_T *old_last)
int qf_winid = 0;
if (IS_LL_STACK(qi))
- qf_winid = curwin->w_id;
+ {
+ if (curwin->w_llist == qi)
+ win = curwin;
+ else
+ {
+ win = qf_find_win_with_loclist(qi);
+ if (win == NULL)
+ return;
+ }
+ qf_winid = win->w_id;
+ }
if (old_last == NULL)
// set curwin/curbuf to buf and save a few things