diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-10-11 11:17:22 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-11 11:17:22 -0400 |
commit | b9776ff5b757ed051acb0ae5c6a1464cec333698 (patch) | |
tree | e65a4a70bea29731e3979780c35e0a3767509c6c /src/nvim/buffer.c | |
parent | f7cc3ae0b7b8ce67294c00729d278362ad60a4f0 (diff) | |
parent | 2f9252304cc001e7de0f445ef382f3bb79a4382c (diff) | |
download | rneovim-b9776ff5b757ed051acb0ae5c6a1464cec333698.tar.gz rneovim-b9776ff5b757ed051acb0ae5c6a1464cec333698.tar.bz2 rneovim-b9776ff5b757ed051acb0ae5c6a1464cec333698.zip |
Merge pull request #13083 from janlazo/vim-8.1.1281
vim-patch:8.1.{523,720,877,988,1015,1036},8.2.{1101,1820,1823,1829,1830,1831}
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r-- | src/nvim/buffer.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index ec633dcc26..0fda66105f 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -5397,18 +5397,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. |