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:
13
src/buffer.c
13
src/buffer.c
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user