Mercurial > vim
diff runtime/doc/eval.txt @ 13026:7c0e0e923537 v8.0.1389
patch 8.0.1389: getqflist() items are missing if not set
commit https://github.com/vim/vim/commit/a6d4849c711379b773529afaed640455287ac934
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Dec 12 22:45:31 2017 +0100
patch 8.0.1389: getqflist() items are missing if not set
Problem: getqflist() items are missing if not set, that makes it more
difficult to handle the values.
Solution: When a value is not available return zero or another invalid
value. (Yegappan Lakshmanan, closes #2430)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 12 Dec 2017 23:00:06 +0100 |
parents | 58cce40c965b |
children | 6e81a68d63a1 |
line wrap: on
line diff
--- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -4687,7 +4687,7 @@ getqflist([{what}]) *getqflist()* winid get the quickfix |window-ID| all all of the above quickfix properties Non-string items in {what} are ignored. To get the value of a - particular item, set it to one. + particular item, set it to zero. 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. @@ -4697,17 +4697,21 @@ getqflist([{what}]) *getqflist()* When "lines" is specified, all the other items except "efm" are ignored. The returned dictionary contains the entry "items" with the list of entries. - In case of error processing {what}, an empty dictionary is - returned. The returned dictionary contains the following entries: - context context information stored with |setqflist()| - id quickfix list ID |quickfix-ID| - idx index of the current entry in the list - items quickfix list entries - nr quickfix list number - size number of entries in the quickfix list - title quickfix list title text + context context information stored with |setqflist()|. + If not present, set to "". + id quickfix list ID |quickfix-ID|. If not + present, set to 0. + idx index of the current entry in the list. If not + present, set to 0. + items quickfix list entries. If not present, set to + an empty list. + nr quickfix list number. If not present, set to 0 + size number of entries in the quickfix list. If not + present, set to 0. + title quickfix list title text. If not present, set + to "". winid quickfix |window-ID|. If not present, set to 0 Examples: >