diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-03-17 16:39:46 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-03-17 16:39:46 +0100 |
commit | 647e24ba3dbf7ff448aa471b1a659a18267ae056 (patch) | |
tree | 175eac74e7e268d58fc5a37df25b649d75564bc1 /runtime/doc/quickfix.txt | |
parent | 38db5276cd8f45fdf3dea8997e8994676e71b105 (diff) |
patch 8.1.1015: quickfix buffer shows up in list, can't get buffer numberv8.1.1015
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 #4113)
Diffstat (limited to 'runtime/doc/quickfix.txt')
-rw-r--r-- | runtime/doc/quickfix.txt | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index 5589df9886..0ceb231b84 100644 --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -496,6 +496,7 @@ EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR 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 @@ -504,7 +505,11 @@ EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR 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 @@ -670,12 +675,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 < |