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

@@ -557,6 +557,8 @@ void getout(int exitval)
if (exmode_active)
exitval += ex_exitval;
set_vim_var_nr(VV_EXITING, exitval);
/* Position the cursor on the last screen line, below all the text */
ui_cursor_goto((int)Rows - 1, 0);