Mercurial > vim
diff runtime/doc/eval.txt @ 12287:20641a7e1fc9 v8.0.1023
patch 8.0.1023: it is not easy to identify a quickfix list
commit https://github.com/vim/vim/commit/a539f4f1ae4a2b3a7dfce89cd3800214c9e990cf
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Aug 30 20:33:55 2017 +0200
patch 8.0.1023: it is not easy to identify a quickfix list
Problem: It is not easy to identify a quickfix list.
Solution: Add the "id" field. (Yegappan Lakshmanan)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 30 Aug 2017 20:45:03 +0200 |
parents | c952a6af25e0 |
children | ec7a4fd21dd5 |
line wrap: on
line diff
--- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -4632,6 +4632,9 @@ getqflist([{what}]) *getqflist()* returns only the items listed in {what} as a dictionary. The following string items are supported in {what}: context get the context stored with |setqflist()| + id get information for the quickfix list with + |quickfix-ID|; zero means the id for the + current list or the list specifed by 'nr' items quickfix list entries nr get information for this quickfix list; zero means the current quickfix list and '$' means @@ -4646,6 +4649,8 @@ getqflist([{what}]) *getqflist()* all all of the above quickfix properties Non-string items in {what} are ignored. If "nr" is not present then the current quickfix list is used. + If both "nr" and a non-zero "id" are specified, then the list + specified by "id" is used. To get the number of lists in the quickfix stack, set 'nr' to '$' in {what}. The 'nr' value in the returned dictionary contains the quickfix stack size. @@ -4657,6 +4662,7 @@ getqflist([{what}]) *getqflist()* The returned dictionary contains the following entries: context context information stored with |setqflist()| + id quickfix list ID |quickfix-ID| items quickfix list entries nr quickfix list number title quickfix list title text @@ -7069,6 +7075,7 @@ setqflist({list} [, {action}[, {what}]]) text and add the resulting entries to the quickfix list {nr}. The value can be a string with one line or a list with multiple lines. + id quickfix list identifier |quickfix-ID| items list of quickfix entries. Same as the {list} argument. nr list number in the quickfix stack; zero @@ -7079,6 +7086,9 @@ setqflist({list} [, {action}[, {what}]]) If the "nr" item is not present, then the current quickfix list is modified. When creating a new quickfix list, "nr" can be set to a value one greater than the quickfix stack size. + When modifying a quickfix list, to guarantee that the correct + list is modified, 'id' should be used instead of 'nr' to + specify the list. Examples: > :call setqflist([], 'r', {'title': 'My search'})