diff options
author | Marco Hinz <mh.codebro@gmail.com> | 2016-11-22 14:53:07 +0100 |
---|---|---|
committer | Marco Hinz <mh.codebro@gmail.com> | 2016-12-01 14:57:22 +0100 |
commit | 147b03e7d01464030955976e08028bcd337f9ff5 (patch) | |
tree | 34b35b45f984d15c90b8b103a165b52ed9950595 /src/nvim/main.c | |
parent | 5194e3bc458eaa43871398bacea01e2d8b30b7e6 (diff) | |
download | rneovim-147b03e7d01464030955976e08028bcd337f9ff5.tar.gz rneovim-147b03e7d01464030955976e08028bcd337f9ff5.tar.bz2 rneovim-147b03e7d01464030955976e08028bcd337f9ff5.zip |
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.
Diffstat (limited to 'src/nvim/main.c')
-rw-r--r-- | src/nvim/main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c index 1bd622bdba..9b9976ac0a 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -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); |