From 9bf2741ba4dda8f7b0864858daaad52e596dd856 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 8 Sep 2018 06:13:23 -0400 Subject: vim-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) https://github.com/vim/vim/commit/a539f4f1ae4a2b3a7dfce89cd3800214c9e990cf --- runtime/doc/eval.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'runtime') diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 98c3388a9d..9a8dffe623 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -4335,6 +4335,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 @@ -4349,6 +4352,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. @@ -4360,6 +4365,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 @@ -6926,6 +6932,7 @@ setqflist({list} [, {action}[, {what}]]) *setqflist()* 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 @@ -6936,6 +6943,9 @@ setqflist({list} [, {action}[, {what}]]) *setqflist()* 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'}) -- cgit