diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-03-13 14:21:37 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-13 14:21:37 +0800 |
commit | c9b94188d5f96349566372e8a0ce94e14fd6b549 (patch) | |
tree | 8a3581dede8900e36a009bc086a503fb1e87fbe8 /runtime | |
parent | d33aebb821b7e7c9197b035c9152859e0b6ed712 (diff) | |
parent | ff48e61ec9ce0fed62b31609c2a83caaa862ccba (diff) | |
download | rneovim-c9b94188d5f96349566372e8a0ce94e14fd6b549.tar.gz rneovim-c9b94188d5f96349566372e8a0ce94e14fd6b549.tar.bz2 rneovim-c9b94188d5f96349566372e8a0ce94e14fd6b549.zip |
Merge pull request #17702 from zeertzjq/vim-8.1.0877
vim-patch:8.1.{0877,0892,1015},8.2.{3759,3762}: quickfix patches
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/builtin.txt | 21 | ||||
-rw-r--r-- | runtime/doc/eval.txt | 16 | ||||
-rw-r--r-- | runtime/doc/quickfix.txt | 13 |
3 files changed, 36 insertions, 14 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index ea7a53fa3b..ccc02e83b2 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -1284,7 +1284,7 @@ complete_info([{what}]) *complete_info()* < *confirm()* confirm({msg} [, {choices} [, {default} [, {type}]]]) - Confirm() offers the user a dialog, from which a choice can be + confirm() offers the user a dialog, from which a choice can be made. It returns the number of the choice. For the first choice this is 1. @@ -3039,10 +3039,16 @@ getloclist({nr} [, {what}]) *getloclist()* If the optional {what} dictionary argument is supplied, then returns the items listed in {what} as a dictionary. Refer to |getqflist()| for the supported items in {what}. - If {what} contains 'filewinid', then returns the id of the - window used to display files from the location list. This - field is applicable only when called from a location list - window. See |location-list-file-window| for more details. + + In addition to the items supported by |getqflist()| in {what}, + the following item is supported by |getloclist()|: + + filewinid id of the window used to display files + from the location list. This field is + applicable only when called from a + location list window. See + |location-list-file-window| for more + details. Returns a |Dictionary| with default values if there is no location list for the window {nr}. @@ -3218,6 +3224,9 @@ getqflist([{what}]) *getqflist()* nr get information for this quickfix list; zero means the current quickfix list and "$" means the last quickfix list + qfbufnr number of the buffer displayed in the quickfix + window. Returns 0 if the quickfix buffer is + not present. See |quickfix-buffer|. size number of entries in the quickfix list title get the list title |quickfix-title| winid get the quickfix |window-ID| @@ -3246,6 +3255,8 @@ getqflist([{what}]) *getqflist()* items quickfix list entries. If not present, set to an empty list. nr quickfix list number. If not present, set to 0 + qfbufnr number of the buffer displayed in the quickfix + window. 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 diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 9fcdbe4cc3..ca2334500c 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -3225,14 +3225,14 @@ text... commands are skipped. When {pattern} is omitted all errors are caught. Examples: > - :catch /^Vim:Interrupt$/ " catch interrupts (CTRL-C) - :catch /^Vim\%((\a\+)\)\=:E/ " catch all Vim errors - :catch /^Vim\%((\a\+)\)\=:/ " catch errors and interrupts - :catch /^Vim(write):/ " catch all errors in :write - :catch /^Vim\%((\a\+)\)\=:E123/ " catch error E123 - :catch /my-exception/ " catch user exception - :catch /.*/ " catch everything - :catch " same as /.*/ + :catch /^Vim:Interrupt$/ " catch interrupts (CTRL-C) + :catch /^Vim\%((\a\+)\)\=:E/ " catch all Vim errors + :catch /^Vim\%((\a\+)\)\=:/ " catch errors and interrupts + :catch /^Vim(write):/ " catch all errors in :write + :catch /^Vim\%((\a\+)\)\=:E123:/ " catch error E123 + :catch /my-exception/ " catch user exception + :catch /.*/ " catch everything + :catch " same as /.*/ < Another character can be used instead of / around the {pattern}, so long as it does not have a special diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index 31a96298d2..8e91b101cd 100644 --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -571,6 +571,7 @@ location list. second quickfix window. If [height] is given the existing window will be resized to it. + *quickfix-buffer* The window will contain a special buffer, with 'buftype' equal to "quickfix". Don't change this! The window will have the w:quickfix_title variable set @@ -579,7 +580,11 @@ location list. status line if the value of 'statusline' is adjusted properly. Whenever this buffer is modified by a quickfix command or function, the |b:changedtick| - variable is incremented. + variable is incremented. You can get the number of + this buffer using the getqflist() and getloclist() + functions by passing the 'qfbufnr' item. For a + location list, this buffer is wiped out when the + location list is removed. *:lop* *:lopen* :lop[en] [height] Open a window to show the location list for the @@ -768,12 +773,18 @@ using these functions are below: " get the quickfix list window id :echo getqflist({'winid' : 0}).winid + " get the quickfix list window buffer number + :echo getqflist({'qfbufnr' : 0}).qfbufnr + " get the context of the current location list :echo getloclist(0, {'context' : 0}).context " get the location list window id of the third window :echo getloclist(3, {'winid' : 0}).winid + " get the location list window buffer number of the third window + :echo getloclist(3, {'qfbufnr' : 0}).qfbufnr + " get the file window id of a location list window (winnr: 4) :echo getloclist(4, {'filewinid' : 0}).filewinid < |