Mercurial > vim
diff runtime/doc/eval.txt @ 12303:ec7a4fd21dd5 v8.0.1031
patch 8.0.1031: "text" argument for getqflist() is confusing
commit https://github.com/vim/vim/commit/2c809b7c7d2bb5e4b7fd09c3d312cadecf0c1ff0
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Sep 1 18:34:02 2017 +0200
patch 8.0.1031: "text" argument for getqflist() is confusing
Problem: "text" argument for getqflist() is confusing. (Lcd47)
Solution: Use "lines" instead. (Yegappan Lakshmanan)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 01 Sep 2017 18:45:04 +0200 |
parents | 20641a7e1fc9 |
children | 66fa8eabbd6e |
line wrap: on
line diff
--- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -4636,14 +4636,13 @@ getqflist([{what}]) *getqflist()* |quickfix-ID|; zero means the id for the current list or the list specifed by 'nr' items quickfix list entries + lines use 'errorformat' to extract items from a list + of lines and return the resulting entries. + Only a |List| type is accepted. The current + quickfix list is not modified. nr get information for this quickfix list; zero means the current quickfix list and '$' means the last quickfix list - text use 'errorformat' to extract items from the - text and return the resulting entries. The - value can be a string with one line or a list - with multiple lines. The current quickfix list - is not modified. title get the list title winid get the |window-ID| (if opened) all all of the above quickfix properties @@ -4671,6 +4670,7 @@ getqflist([{what}]) *getqflist()* Examples: > :echo getqflist({'all': 1}) :echo getqflist({'nr': 2, 'title': 1}) + :echo getqflist({'lines' : ["F1:10:L10"]}) < getreg([{regname} [, 1 [, {list}]]]) *getreg()* @@ -7071,13 +7071,12 @@ setqflist({list} [, {action}[, {what}]]) argument is ignored. The following items can be specified in {what}: context any Vim type can be stored as a context - text use 'errorformat' to extract items from the - 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. + lines use 'errorformat' to parse a list of lines and + add the resulting entries to the quickfix list + {nr} or {id}. Only a |List| value is supported. nr list number in the quickfix stack; zero means the current quickfix list and '$' means the last quickfix list @@ -7091,8 +7090,9 @@ setqflist({list} [, {action}[, {what}]]) specify the list. Examples: > - :call setqflist([], 'r', {'title': 'My search'}) - :call setqflist([], 'r', {'nr': 2, 'title': 'Errors'}) + :call setqflist([], 'r', {'title': 'My search'}) + :call setqflist([], 'r', {'nr': 2, 'title': 'Errors'}) + :call setqflist([], 'a', {'id':myid, 'lines':["F1:10:L10"]}) < Returns zero for success, -1 for failure.