0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

patch 8.2.3591: no event is triggered when closing a window

Problem:    No event is triggered when closing a window.
Solution:   Add the WinClosed event. (Naohiro Ono, closes #9110)
This commit is contained in:
naohiro ono
2021-11-13 12:38:49 +00:00
committed by Bram Moolenaar
parent a0fca17251
commit 23beefed73
6 changed files with 84 additions and 4 deletions

View File

@@ -186,6 +186,7 @@ static struct event_name
{"VimLeave", EVENT_VIMLEAVE},
{"VimLeavePre", EVENT_VIMLEAVEPRE},
{"WinNew", EVENT_WINNEW},
{"WinClosed", EVENT_WINCLOSED},
{"WinEnter", EVENT_WINENTER},
{"WinLeave", EVENT_WINLEAVE},
{"VimResized", EVENT_VIMRESIZED},
@@ -2042,7 +2043,8 @@ apply_autocmds_group(
|| event == EVENT_OPTIONSET
|| event == EVENT_QUICKFIXCMDPOST
|| event == EVENT_DIRCHANGED
|| event == EVENT_MODECHANGED)
|| event == EVENT_MODECHANGED
|| event == EVENT_WINCLOSED)
{
fname = vim_strsave(fname);
autocmd_fname_full = TRUE; // don't expand it later