Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
12286:27efa3b025f4 | 12287:20641a7e1fc9 |
---|---|
4630 < | 4630 < |
4631 If the optional {what} dictionary argument is supplied, then | 4631 If the optional {what} dictionary argument is supplied, then |
4632 returns only the items listed in {what} as a dictionary. The | 4632 returns only the items listed in {what} as a dictionary. The |
4633 following string items are supported in {what}: | 4633 following string items are supported in {what}: |
4634 context get the context stored with |setqflist()| | 4634 context get the context stored with |setqflist()| |
4635 id get information for the quickfix list with | |
4636 |quickfix-ID|; zero means the id for the | |
4637 current list or the list specifed by 'nr' | |
4635 items quickfix list entries | 4638 items quickfix list entries |
4636 nr get information for this quickfix list; zero | 4639 nr get information for this quickfix list; zero |
4637 means the current quickfix list and '$' means | 4640 means the current quickfix list and '$' means |
4638 the last quickfix list | 4641 the last quickfix list |
4639 text use 'errorformat' to extract items from the | 4642 text use 'errorformat' to extract items from the |
4644 title get the list title | 4647 title get the list title |
4645 winid get the |window-ID| (if opened) | 4648 winid get the |window-ID| (if opened) |
4646 all all of the above quickfix properties | 4649 all all of the above quickfix properties |
4647 Non-string items in {what} are ignored. | 4650 Non-string items in {what} are ignored. |
4648 If "nr" is not present then the current quickfix list is used. | 4651 If "nr" is not present then the current quickfix list is used. |
4652 If both "nr" and a non-zero "id" are specified, then the list | |
4653 specified by "id" is used. | |
4649 To get the number of lists in the quickfix stack, set 'nr' to | 4654 To get the number of lists in the quickfix stack, set 'nr' to |
4650 '$' in {what}. The 'nr' value in the returned dictionary | 4655 '$' in {what}. The 'nr' value in the returned dictionary |
4651 contains the quickfix stack size. | 4656 contains the quickfix stack size. |
4652 When 'text' is specified, all the other items are ignored. The | 4657 When 'text' is specified, all the other items are ignored. The |
4653 returned dictionary contains the entry 'items' with the list | 4658 returned dictionary contains the entry 'items' with the list |
4655 In case of error processing {what}, an empty dictionary is | 4660 In case of error processing {what}, an empty dictionary is |
4656 returned. | 4661 returned. |
4657 | 4662 |
4658 The returned dictionary contains the following entries: | 4663 The returned dictionary contains the following entries: |
4659 context context information stored with |setqflist()| | 4664 context context information stored with |setqflist()| |
4665 id quickfix list ID |quickfix-ID| | |
4660 items quickfix list entries | 4666 items quickfix list entries |
4661 nr quickfix list number | 4667 nr quickfix list number |
4662 title quickfix list title text | 4668 title quickfix list title text |
4663 winid quickfix |window-ID| (if opened) | 4669 winid quickfix |window-ID| (if opened) |
4664 | 4670 |
7067 context any Vim type can be stored as a context | 7073 context any Vim type can be stored as a context |
7068 text use 'errorformat' to extract items from the | 7074 text use 'errorformat' to extract items from the |
7069 text and add the resulting entries to the | 7075 text and add the resulting entries to the |
7070 quickfix list {nr}. The value can be a string | 7076 quickfix list {nr}. The value can be a string |
7071 with one line or a list with multiple lines. | 7077 with one line or a list with multiple lines. |
7078 id quickfix list identifier |quickfix-ID| | |
7072 items list of quickfix entries. Same as the {list} | 7079 items list of quickfix entries. Same as the {list} |
7073 argument. | 7080 argument. |
7074 nr list number in the quickfix stack; zero | 7081 nr list number in the quickfix stack; zero |
7075 means the current quickfix list and '$' means | 7082 means the current quickfix list and '$' means |
7076 the last quickfix list | 7083 the last quickfix list |
7077 title quickfix list title text | 7084 title quickfix list title text |
7078 Unsupported keys in {what} are ignored. | 7085 Unsupported keys in {what} are ignored. |
7079 If the "nr" item is not present, then the current quickfix list | 7086 If the "nr" item is not present, then the current quickfix list |
7080 is modified. When creating a new quickfix list, "nr" can be | 7087 is modified. When creating a new quickfix list, "nr" can be |
7081 set to a value one greater than the quickfix stack size. | 7088 set to a value one greater than the quickfix stack size. |
7089 When modifying a quickfix list, to guarantee that the correct | |
7090 list is modified, 'id' should be used instead of 'nr' to | |
7091 specify the list. | |
7082 | 7092 |
7083 Examples: > | 7093 Examples: > |
7084 :call setqflist([], 'r', {'title': 'My search'}) | 7094 :call setqflist([], 'r', {'title': 'My search'}) |
7085 :call setqflist([], 'r', {'nr': 2, 'title': 'Errors'}) | 7095 :call setqflist([], 'r', {'nr': 2, 'title': 'Errors'}) |
7086 < | 7096 < |