aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-10-21 08:32:02 -0400
committerGitHub <noreply@github.com>2020-10-21 08:32:02 -0400
commit0f590ae2a8bcebcb1398cb30997bd718d6f466e5 (patch)
treec969a5ba6f92663d01d1ce9ccb67c57763330218 /src/nvim/buffer.c
parent77dc891bfbdcdb84f919f6ff5b535b385c121007 (diff)
parentdff3a0d4495df7de085d442fd0ad15b5a8b9355d (diff)
downloadrneovim-0f590ae2a8bcebcb1398cb30997bd718d6f466e5.tar.gz
rneovim-0f590ae2a8bcebcb1398cb30997bd718d6f466e5.tar.bz2
rneovim-0f590ae2a8bcebcb1398cb30997bd718d6f466e5.zip
Merge pull request #13123 from janlazo/vim-8.2.1871
vim-patch:8.2.{6,1002,1871} Revert patches 8.1.0877 and 8.1.1015 from #13083.
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r--src/nvim/buffer.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index 0fda66105f..8f631ae13b 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -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.