mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 06:58:35 +00:00
Add TabNew event
TabNew triggers when entering a new tab page, but not when entering an already created one.
This commit is contained in:

committed by
Justin M. Keyes

parent
0429857689
commit
817be96be5
@@ -5715,6 +5715,8 @@ void ex_splitview(exarg_T *eap)
|
||||
if (win_new_tabpage(cmdmod.tab != 0 ? cmdmod.tab
|
||||
: eap->addr_count == 0 ? 0
|
||||
: (int)eap->line2 + 1) != FAIL) {
|
||||
apply_autocmds(EVENT_TABNEW, eap->arg, eap->arg, FALSE, curbuf);
|
||||
entering_new_tab = true;
|
||||
do_exedit(eap, old_curwin);
|
||||
|
||||
/* set the alternate buffer for the window we came from */
|
||||
|
@@ -5247,6 +5247,7 @@ static struct event_name {
|
||||
{"Syntax", EVENT_SYNTAX},
|
||||
{"TabEnter", EVENT_TABENTER},
|
||||
{"TabLeave", EVENT_TABLEAVE},
|
||||
{"TabNew", EVENT_TABNEW},
|
||||
{"TermChanged", EVENT_TERMCHANGED},
|
||||
{"TermResponse", EVENT_TERMRESPONSE},
|
||||
{"TextChanged", EVENT_TEXTCHANGED},
|
||||
|
@@ -95,6 +95,7 @@ typedef enum auto_event {
|
||||
EVENT_CURSORMOVEDI, /* cursor was moved in Insert mode */
|
||||
EVENT_TABLEAVE, /* before leaving a tab page */
|
||||
EVENT_TABENTER, /* after entering a tab page */
|
||||
EVENT_TABNEW, /* when creating a new tab */
|
||||
EVENT_SHELLCMDPOST, /* after ":!cmd" */
|
||||
EVENT_SHELLFILTERPOST, /* after ":1,2!cmd", ":w !cmd", ":r !cmd". */
|
||||
EVENT_TEXTCHANGED, /* text was modified */
|
||||
|
Reference in New Issue
Block a user