1
0
forked from aniani/vim

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)
This commit is contained in:
Bram Moolenaar
2017-12-12 22:45:31 +01:00
parent fae8ed1fc8
commit a6d4849c71
4 changed files with 162 additions and 72 deletions

View File

@@ -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: >