aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-03-13 14:21:37 +0800
committerGitHub <noreply@github.com>2022-03-13 14:21:37 +0800
commitc9b94188d5f96349566372e8a0ce94e14fd6b549 (patch)
tree8a3581dede8900e36a009bc086a503fb1e87fbe8 /src/nvim/buffer.c
parentd33aebb821b7e7c9197b035c9152859e0b6ed712 (diff)
parentff48e61ec9ce0fed62b31609c2a83caaa862ccba (diff)
downloadrneovim-c9b94188d5f96349566372e8a0ce94e14fd6b549.tar.gz
rneovim-c9b94188d5f96349566372e8a0ce94e14fd6b549.tar.bz2
rneovim-c9b94188d5f96349566372e8a0ce94e14fd6b549.zip
Merge pull request #17702 from zeertzjq/vim-8.1.0877
vim-patch:8.1.{0877,0892,1015},8.2.{3759,3762}: quickfix patches
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r--src/nvim/buffer.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index 2e2459aecf..3fdc111b6f 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -5333,16 +5333,12 @@ bool buf_hide(const buf_T *const buf)
char_u *buf_spname(buf_T *buf)
{
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.
- if (find_win_for_buf(buf, &win, &tp) && win->w_llist_ref != NULL) {
- return (char_u *)_(msg_loclist);
- } else {
+ // 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()) {
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.