aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/terminal.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/terminal.c')
-rw-r--r--src/nvim/terminal.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nvim/terminal.c b/src/nvim/terminal.c
index 35c68fa1f6..83ade74db1 100644
--- a/src/nvim/terminal.c
+++ b/src/nvim/terminal.c
@@ -324,10 +324,11 @@ void terminal_close(Terminal *term, int status)
}
if (buf && !is_autocmd_blocked()) {
- dict_T *dict = get_vim_var_dict(VV_EVENT);
+ save_v_event_T save_v_event;
+ dict_T *dict = get_v_event(&save_v_event);
tv_dict_add_nr(dict, S_LEN("status"), status);
apply_autocmds(EVENT_TERMCLOSE, NULL, NULL, false, buf);
- tv_dict_clear(dict);
+ restore_v_event(dict, &save_v_event);
}
}
@@ -412,6 +413,7 @@ void terminal_enter(void)
curwin->w_redr_status = true; // For mode() in statusline. #8323
ui_busy_start();
apply_autocmds(EVENT_TERMENTER, NULL, NULL, false, curbuf);
+ trigger_modechanged();
s->state.execute = terminal_execute;
s->state.check = terminal_check;