]> git.feebdaed.xyz Git - 0xmirror/vim.git/commitdiff
runtime(doc): improve :catch documentation
authorMao-Yining <101858210+mao-yining@users.noreply.github.com>
Sat, 27 Dec 2025 15:28:26 +0000 (15:28 +0000)
committerChristian Brabandt <cb@256bit.org>
Sat, 27 Dec 2025 15:28:26 +0000 (15:28 +0000)
related: #18984
closes:  #19029

Signed-off-by: Mao-Yining <101858210+mao-yining@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/doc/eval.txt

index 8a252b63dbaf6c0d5a9ae454d39fc2fd467bc2d3..7ba70e307c55ffc49ed2ba5c6c78129e86748d98 100644 (file)
@@ -1,4 +1,4 @@
-*eval.txt*     For Vim version 9.1.  Last change: 2025 Dec 23
+*eval.txt*     For Vim version 9.1.  Last change: 2025 Dec 27
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -3723,11 +3723,11 @@ text...
                        {cmd}.  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\%((\S\+)\)\=:E/     " catch all Vim errors
+               :catch /^Vim\%((\S\+)\)\=:/      " catch errors and interrupts
                :catch /^Vim(write):/            " catch all errors in :write
                :catch /^Vim(!):/                " catch all errors in :!
-               :catch /^Vim\%((\a\+)\)\=:E123:/ " catch error E123
+               :catch /^Vim\%((\S\+)\)\=:E123:/ " catch error E123
                :catch /my-exception/            " catch user exception
                :catch /.*/                      " catch everything
                :catch                           " same as /.*/