Add v:exiting

Contains the exit value nvim will use.

Before exiting, it is v:null. That way jobs or autocmds (in VimLeavePre or
VimLeave) can check if Neovim is about to quit and with what exit value.

Closes #4666.
This commit is contained in:
Marco Hinz
2016-11-22 14:53:07 +01:00
parent 5194e3bc45
commit 147b03e7d0
4 changed files with 12 additions and 0 deletions

View File

@@ -1383,6 +1383,9 @@ 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 The exit value Nvim will use. Before exiting, it is |v:null|.
*v:errmsg* *errmsg-variable*
v:errmsg Last given error message. It's allowed to set this variable.
Example: >