diff options
author | Bram Moolenaar <Bram@vim.org> | 2010-05-28 21:07:08 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2010-05-28 21:07:08 +0200 |
commit | 0e1e25fb0a95ac5be411fbf25c8e25e1008c0d3f (patch) | |
tree | c2dd9604e8d09cea184ba3d995aa16d564775dcd /runtime/doc | |
parent | 1d68952a3eeb40efc5568d99d0b2dd37960975e7 (diff) | |
download | vim-git-0e1e25fb0a95ac5be411fbf25c8e25e1008c0d3f.tar.gz |
Don't execute some autocommands when v:dying is 2 or more.
Diffstat (limited to 'runtime/doc')
-rw-r--r-- | runtime/doc/autocmd.txt | 8 | ||||
-rw-r--r-- | runtime/doc/eval.txt | 4 | ||||
-rw-r--r-- | runtime/doc/todo.txt | 3 | ||||
-rw-r--r-- | runtime/doc/version7.txt | 4 |
4 files changed, 15 insertions, 4 deletions
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index c1cbab833..a23032cd1 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -401,6 +401,8 @@ BufUnload Before unloading a buffer. This is when the buffer being unloaded "<afile>". Don't change to another buffer, it will cause problems. + When exiting and v:dying is 2 or more this + event is not triggered. *BufWinEnter* BufWinEnter After a buffer is displayed in a window. This can be when the buffer is loaded (after @@ -422,6 +424,8 @@ BufWinLeave Before a buffer is removed from a window. NOTE: When this autocommand is executed, the current buffer "%" may be different from the buffer being unloaded "<afile>". + When exiting and v:dying is 2 or more this + event is not triggered. *BufWipeout* BufWipeout Before completely deleting a buffer. The BufUnload and BufDelete events may be called @@ -799,6 +803,8 @@ VimLeave Before exiting Vim, just after writing the .viminfo file. Executed only once, like VimLeavePre. To detect an abnormal exit use |v:dying|. + When v:dying is 2 or more this event is not + triggered. *VimLeavePre* VimLeavePre Before exiting Vim, just before writing the .viminfo file. This is executed only once, @@ -807,6 +813,8 @@ VimLeavePre Before exiting Vim, just before writing the Mostly useful with a "*" pattern. > :autocmd VimLeavePre * call CleanupStuff() < To detect an abnormal exit use |v:dying|. + When v:dying is 2 or more this event is not + triggered. *VimResized* VimResized After the Vim window was resized, thus 'lines' and/or 'columns' changed. Not when starting diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 2a2d60155..08b79bb78 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1348,7 +1348,9 @@ v:dying Normally zero. When a deadly signal is caught it's set to terminate normally. {only works on Unix} Example: > :au VimLeave * if v:dying | echo "\nAAAAaaaarrrggghhhh!!!\n" | endif -< +< Note: if another deadly signal is caught when v:dying is one, + VimLeave autocommands will not be executed. + *v:errmsg* *errmsg-variable* v:errmsg Last given error message. It's allowed to set this variable. Example: > diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index e0a615944..30fb99dc9 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -30,9 +30,6 @@ be worked on, but only if you sponsor Vim development. See |sponsor|. *known-bugs* -------------------- Known bugs and current work ----------------------- -When Vim crashes it may run out of stack while executing autocommands. Patch -to not run autocommands when leaving Vim? (James Vega, 2010 May 23) - Patch for invalid mem access in completion. (Dominique Pelle, 2010 May 26) Invalid memory access when deleting funcref variable. Patch by Lech Lorens, diff --git a/runtime/doc/version7.txt b/runtime/doc/version7.txt index d59b62264..f469ac0f0 100644 --- a/runtime/doc/version7.txt +++ b/runtime/doc/version7.txt @@ -7166,6 +7166,10 @@ don't save what you see. This could result in work being lost. Now the text after recovery is compared to the original file contents. When they differ the buffer is marked as modified. +When Vim is exiting because of a deadly signal, when v:dying is 2 or more, +VimLeavePre, VimLeave, BufWinLeave and BufUnload autocommands are not +executed. + Added *added-7.3* ----- |