diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/auevents.lua | 2 | ||||
-rw-r--r-- | src/nvim/terminal.c | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/auevents.lua b/src/nvim/auevents.lua index c808af37b1..c223679596 100644 --- a/src/nvim/auevents.lua +++ b/src/nvim/auevents.lua @@ -90,6 +90,8 @@ return { 'TabNewEntered', -- after entering a new tab 'TermChanged', -- after changing 'term' 'TermClose', -- after the process exits + 'TermEnter', -- after entering Terminal mode + 'TermLeave', -- after leaving Terminal mode 'TermOpen', -- after opening a terminal buffer 'TermResponse', -- after setting "v:termresponse" 'TextChanged', -- text was modified diff --git a/src/nvim/terminal.c b/src/nvim/terminal.c index b1ce0e6592..8fcc8bf0a5 100644 --- a/src/nvim/terminal.c +++ b/src/nvim/terminal.c @@ -355,6 +355,7 @@ void terminal_enter(void) showmode(); curwin->w_redr_status = true; // For mode() in statusline. #8323 ui_busy_start(); + apply_autocmds(EVENT_TERMENTER, NULL, NULL, false, curbuf); s->state.execute = terminal_execute; s->state.check = terminal_check; @@ -363,6 +364,8 @@ void terminal_enter(void) restart_edit = 0; State = save_state; RedrawingDisabled = s->save_rd; + apply_autocmds(EVENT_TERMLEAVE, NULL, NULL, false, curbuf); + if (save_curwin == curwin) { // save_curwin may be invalid (window closed)! curwin->w_p_cul = save_w_p_cul; curwin->w_p_cuc = save_w_p_cuc; |