comparison 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
comparison
equal deleted inserted replaced
13025:5f7d269284a3 13026:7c0e0e923537
4685 size number of entries in the quickfix list 4685 size number of entries in the quickfix list
4686 title get the list title 4686 title get the list title
4687 winid get the quickfix |window-ID| 4687 winid get the quickfix |window-ID|
4688 all all of the above quickfix properties 4688 all all of the above quickfix properties
4689 Non-string items in {what} are ignored. To get the value of a 4689 Non-string items in {what} are ignored. To get the value of a
4690 particular item, set it to one. 4690 particular item, set it to zero.
4691 If "nr" is not present then the current quickfix list is used. 4691 If "nr" is not present then the current quickfix list is used.
4692 If both "nr" and a non-zero "id" are specified, then the list 4692 If both "nr" and a non-zero "id" are specified, then the list
4693 specified by "id" is used. 4693 specified by "id" is used.
4694 To get the number of lists in the quickfix stack, set "nr" to 4694 To get the number of lists in the quickfix stack, set "nr" to
4695 "$" in {what}. The "nr" value in the returned dictionary 4695 "$" in {what}. The "nr" value in the returned dictionary
4696 contains the quickfix stack size. 4696 contains the quickfix stack size.
4697 When "lines" is specified, all the other items except "efm" 4697 When "lines" is specified, all the other items except "efm"
4698 are ignored. The returned dictionary contains the entry 4698 are ignored. The returned dictionary contains the entry
4699 "items" with the list of entries. 4699 "items" with the list of entries.
4700 In case of error processing {what}, an empty dictionary is
4701 returned.
4702 4700
4703 The returned dictionary contains the following entries: 4701 The returned dictionary contains the following entries:
4704 context context information stored with |setqflist()| 4702 context context information stored with |setqflist()|.
4705 id quickfix list ID |quickfix-ID| 4703 If not present, set to "".
4706 idx index of the current entry in the list 4704 id quickfix list ID |quickfix-ID|. If not
4707 items quickfix list entries 4705 present, set to 0.
4708 nr quickfix list number 4706 idx index of the current entry in the list. If not
4709 size number of entries in the quickfix list 4707 present, set to 0.
4710 title quickfix list title text 4708 items quickfix list entries. If not present, set to
4709 an empty list.
4710 nr quickfix list number. If not present, set to 0
4711 size number of entries in the quickfix list. If not
4712 present, set to 0.
4713 title quickfix list title text. If not present, set
4714 to "".
4711 winid quickfix |window-ID|. If not present, set to 0 4715 winid quickfix |window-ID|. If not present, set to 0
4712 4716
4713 Examples: > 4717 Examples: >
4714 :echo getqflist({'all': 1}) 4718 :echo getqflist({'all': 1})
4715 :echo getqflist({'nr': 2, 'title': 1}) 4719 :echo getqflist({'nr': 2, 'title': 1})