0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.1.0877: new buffer used every time the quickfix window is opened

Problem:    New buffer used every time the quickfix window is opened.
Solution:   Reuse the buffer. (Yegappan Lakshmanan, closes #3902)
This commit is contained in:
Bram Moolenaar
2019-02-05 21:23:04 +01:00
parent 2a78b7c704
commit ee8188fc74
5 changed files with 110 additions and 33 deletions

View File

@@ -5753,17 +5753,14 @@ buf_spname(buf_T *buf)
#if defined(FEAT_QUICKFIX)
if (bt_quickfix(buf))
{
win_T *win;
tabpage_T *tp;
/*
* For location list window, w_llist_ref points to the location list.
* For quickfix window, w_llist_ref is NULL.
* Differentiate between the quickfix and location list buffers using
* the buffer number stored in the global quickfix stack.
*/
if (find_win_for_buf(buf, &win, &tp) == OK && win->w_llist_ref != NULL)
return (char_u *)_(msg_loclist);
else
if (buf->b_fnum == qf_stack_get_bufnr())
return (char_u *)_(msg_qflist);
else
return (char_u *)_(msg_loclist);
}
#endif