mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04: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:
@@ -146,6 +146,7 @@ static struct vimvar
|
||||
{VV_NAME("echospace", VAR_NUMBER), VV_RO},
|
||||
{VV_NAME("argv", VAR_LIST), VV_RO},
|
||||
{VV_NAME("collate", VAR_STRING), VV_RO},
|
||||
{VV_NAME("exiting", VAR_SPECIAL), VV_RO},
|
||||
};
|
||||
|
||||
// shorthand
|
||||
@@ -218,6 +219,7 @@ evalvars_init(void)
|
||||
|
||||
set_vim_var_nr(VV_SEARCHFORWARD, 1L);
|
||||
set_vim_var_nr(VV_HLSEARCH, 1L);
|
||||
set_vim_var_nr(VV_EXITING, VVAL_NULL);
|
||||
set_vim_var_dict(VV_COMPLETED_ITEM, dict_alloc_lock(VAR_FIXED));
|
||||
set_vim_var_list(VV_ERRORS, list_alloc());
|
||||
set_vim_var_dict(VV_EVENT, dict_alloc_lock(VAR_FIXED));
|
||||
|
Reference in New Issue
Block a user