mirror of
https://github.com/zoriya/vim.git
synced 2025-12-06 07:16:15 +00:00
patch 8.2.2070: can't get the exit value in VimLeave(Pre) autocommands
Problem: Can't get the exit value in VimLeave or VimLeavePre autocommands. Solution: Add v:exiting like in Neovim. (Yegappan Lakshmanan, closes #7395)
This commit is contained in:
@@ -1850,6 +1850,13 @@ v:dying Normally zero. When a deadly signal is caught it's set to
|
||||
< Note: if another deadly signal is caught when v:dying is one,
|
||||
VimLeave autocommands will not be executed.
|
||||
|
||||
*v:exiting* *exiting-variable*
|
||||
v:exiting Vim exit code. Normally zero, non-zero when something went
|
||||
wrong. The value is v:null before invoking the |VimLeavePre|
|
||||
and |VimLeave| autocmds. See |:q|, |:x| and |:cquit|.
|
||||
Example: >
|
||||
:au VimLeave * echo "Exit value is " .. v:exiting
|
||||
<
|
||||
*v:echospace* *echospace-variable*
|
||||
v:echospace Number of screen cells that can be used for an `:echo` message
|
||||
in the last screen line before causing the |hit-enter-prompt|.
|
||||
|
||||
Reference in New Issue
Block a user