autocmds: TermEnter, TermLeave #8550

fix #8428
This commit is contained in:
Usama Hameed
2019-09-15 03:54:19 +05:00
committed by Justin M. Keyes
parent 8c88d98df9
commit fc27dc98d7
5 changed files with 53 additions and 7 deletions

View File

@@ -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;