aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/quickfix.txt
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-10-10 15:42:25 -0400
committerzeertzjq <zeertzjq@outlook.com>2022-03-13 13:17:28 +0800
commit163ec00f44c99b08a932144164b8c467ec672c3c (patch)
treef5bb1fda21c79a160f422a58fd92a177ff27d1a7 /runtime/doc/quickfix.txt
parent6c26ab71ceb9f4f12c55492ba7ab33a5e61af079 (diff)
downloadrneovim-163ec00f44c99b08a932144164b8c467ec672c3c.tar.gz
rneovim-163ec00f44c99b08a932144164b8c467ec672c3c.tar.bz2
rneovim-163ec00f44c99b08a932144164b8c467ec672c3c.zip
vim-patch:8.1.1015: quickfix buffer shows up in list, can't get buffer number
Problem: Quickfix buffer shows up in list, can't get buffer number. Solution: Make the quickfix buffer unlisted when the quickfix window is closed. get the quickfix buffer number with getqflist(). (Yegappan Lakshmanan, closes vim/vim#4113) https://github.com/vim/vim/commit/647e24ba3dbf7ff448aa471b1a659a18267ae056
Diffstat (limited to 'runtime/doc/quickfix.txt')
-rw-r--r--runtime/doc/quickfix.txt13
1 files changed, 12 insertions, 1 deletions
diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt
index 31a96298d2..8e91b101cd 100644
--- a/runtime/doc/quickfix.txt
+++ b/runtime/doc/quickfix.txt
@@ -571,6 +571,7 @@ location list.
second quickfix window. If [height] is given the
existing window will be resized to it.
+ *quickfix-buffer*
The window will contain a special buffer, with
'buftype' equal to "quickfix". Don't change this!
The window will have the w:quickfix_title variable set
@@ -579,7 +580,11 @@ location list.
status line if the value of 'statusline' is adjusted
properly. Whenever this buffer is modified by a
quickfix command or function, the |b:changedtick|
- variable is incremented.
+ variable is incremented. You can get the number of
+ this buffer using the getqflist() and getloclist()
+ functions by passing the 'qfbufnr' item. For a
+ location list, this buffer is wiped out when the
+ location list is removed.
*:lop* *:lopen*
:lop[en] [height] Open a window to show the location list for the
@@ -768,12 +773,18 @@ using these functions are below:
" get the quickfix list window id
:echo getqflist({'winid' : 0}).winid
+ " get the quickfix list window buffer number
+ :echo getqflist({'qfbufnr' : 0}).qfbufnr
+
" get the context of the current location list
:echo getloclist(0, {'context' : 0}).context
" get the location list window id of the third window
:echo getloclist(3, {'winid' : 0}).winid
+ " get the location list window buffer number of the third window
+ :echo getloclist(3, {'qfbufnr' : 0}).qfbufnr
+
" get the file window id of a location list window (winnr: 4)
:echo getloclist(4, {'filewinid' : 0}).filewinid
<