comparison runtime/doc/eval.txt @ 23048:ad674a98058a v8.2.2070

patch 8.2.2070: can't get the exit value in VimLeave(Pre) autocommands Commit: https://github.com/vim/vim/commit/f0068c5154a99b86b2c4515a4b93c003b2445cf4 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Nov 30 17:42:10 2020 +0100 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 https://github.com/vim/vim/issues/7395)
author Bram Moolenaar <Bram@vim.org>
date Mon, 30 Nov 2020 17:45:05 +0100
parents e7c125224b1a
children 99ef85ff1af4
comparison
equal deleted inserted replaced
23047:29c5f168c6fd 23048:ad674a98058a
1848 Example: > 1848 Example: >
1849 :au VimLeave * if v:dying | echo "\nAAAAaaaarrrggghhhh!!!\n" | endif 1849 :au VimLeave * if v:dying | echo "\nAAAAaaaarrrggghhhh!!!\n" | endif
1850 < Note: if another deadly signal is caught when v:dying is one, 1850 < Note: if another deadly signal is caught when v:dying is one,
1851 VimLeave autocommands will not be executed. 1851 VimLeave autocommands will not be executed.
1852 1852
1853 *v:exiting* *exiting-variable*
1854 v:exiting Vim exit code. Normally zero, non-zero when something went
1855 wrong. The value is v:null before invoking the |VimLeavePre|
1856 and |VimLeave| autocmds. See |:q|, |:x| and |:cquit|.
1857 Example: >
1858 :au VimLeave * echo "Exit value is " .. v:exiting
1859 <
1853 *v:echospace* *echospace-variable* 1860 *v:echospace* *echospace-variable*
1854 v:echospace Number of screen cells that can be used for an `:echo` message 1861 v:echospace Number of screen cells that can be used for an `:echo` message
1855 in the last screen line before causing the |hit-enter-prompt|. 1862 in the last screen line before causing the |hit-enter-prompt|.
1856 Depends on 'showcmd', 'ruler' and 'columns'. You need to 1863 Depends on 'showcmd', 'ruler' and 'columns'. You need to
1857 check 'cmdheight' for whether there are full-width lines 1864 check 'cmdheight' for whether there are full-width lines