fix(terminal): avoid Insert mode in Terminal buffer (#25820)

This commit is contained in:
zeertzjq
2023-10-29 09:32:03 +08:00
committed by GitHub
parent a5629abce2
commit 82b1a389ba
2 changed files with 21 additions and 0 deletions

View File

@@ -396,6 +396,13 @@ static int insert_check(VimState *state)
Insstart_orig = Insstart;
}
if (curbuf->terminal) {
// Exit Insert mode and go to Terminal mode.
stop_insert_mode = true;
restart_edit = 'I';
stuffcharReadbuff(K_NOP);
}
if (stop_insert_mode && !ins_compl_active()) {
// ":stopinsert" used
s->count = 0;