diff runtime/doc/quickfix.txt @ 16019:096b8ccd855e v8.1.1015

patch 8.1.1015: quickfix buffer shows up in list, can't get buffer number commit https://github.com/vim/vim/commit/647e24ba3dbf7ff448aa471b1a659a18267ae056 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Mar 17 16:39:46 2019 +0100 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 #4113)
author Bram Moolenaar <Bram@vim.org>
date Sun, 17 Mar 2019 16:45:11 +0100
parents f0f06837a699
children 28e3ba82d8c8
line wrap: on
line diff
--- a/runtime/doc/quickfix.txt
+++ b/runtime/doc/quickfix.txt
@@ -496,6 +496,7 @@ 2. The error window					*quickfix-window
 			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 @@ 2. The error window					*quickfix-window
 			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
 <