From ad52f96a2d3169cb1b915c1d4a6ba26ba6e5bd0a Mon Sep 17 00:00:00 2001 From: Yegappan Lakshmanan Date: Sat, 19 Jun 2021 18:22:53 +0200 Subject: patch 8.2.3018: 'quickfixtextfunc' formatting is lost when switching buffers 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) --- src/quickfix.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/quickfix.c') 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 -- cgit v1.2.1