patch 9.1.1202: Missing TabClosedPre autocommand
Problem: Missing TabClosedPre autocommand
(zoumi)
Solution: Add the TabClosedPre autcommand (Jim Zhou).
fixes: #16518
closes: #16855
Signed-off-by: Jim Zhou <jimzhouzzy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
587601671c
commit
5606ca5349
@ -180,6 +180,7 @@ static keyvalue_T event_tab[NUM_EVENTS] = {
|
||||
KEYVALUE_ENTRY(EVENT_SWAPEXISTS, "SwapExists"),
|
||||
KEYVALUE_ENTRY(EVENT_SYNTAX, "Syntax"),
|
||||
KEYVALUE_ENTRY(EVENT_TABCLOSED, "TabClosed"),
|
||||
KEYVALUE_ENTRY(EVENT_TABCLOSEDPRE, "TabClosedPre"),
|
||||
KEYVALUE_ENTRY(EVENT_TABENTER, "TabEnter"),
|
||||
KEYVALUE_ENTRY(EVENT_TABLEAVE, "TabLeave"),
|
||||
KEYVALUE_ENTRY(EVENT_TABNEW, "TabNew"),
|
||||
@ -2900,6 +2901,14 @@ get_event_name_no_group(expand_T *xp UNUSED, int idx, int win)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return TRUE when there is a TabClosedPre autocommand defined.
|
||||
*/
|
||||
int
|
||||
has_tabclosedpre(void)
|
||||
{
|
||||
return (first_autopat[(int)EVENT_TABCLOSEDPRE] != NULL);
|
||||
}
|
||||
|
||||
#if defined(FEAT_EVAL) || defined(PROTO)
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user