Revert "vim-patch:8.1.0877: new buffer used every time the quickfix window is opened"

This reverts commit e82b8ddef1.

Fix https://github.com/neovim/neovim/issues/13104
This commit is contained in:
Jan Edmund Lazo
2020-10-20 22:05:13 -04:00
parent 7b2fd21560
commit dff3a0d449
3 changed files with 32 additions and 53 deletions

View File

@@ -5397,12 +5397,16 @@ bool buf_hide(const buf_T *const buf)
char_u *buf_spname(buf_T *buf)
{
if (bt_quickfix(buf)) {
// Differentiate between the quickfix and location list buffers using
// the buffer number stored in the global quickfix stack.
if (buf->b_fnum == qf_stack_get_bufnr()) {
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.
if (find_win_for_buf(buf, &win, &tp) && win->w_llist_ref != NULL) {
return (char_u *)_(msg_loclist);
} else {
return (char_u *)_(msg_qflist);
}
return (char_u *)_(msg_loclist);
}
// There is no _file_ when 'buftype' is "nofile", b_sfname
// contains the name as specified by the user.