Skip to content

Commit 6fe15bb

Browse files
committed
patch 8.0.0947: entering terminal using C-O C-W C-W goes to Insert mode
Problem: When in Insert mode and using CTRL-O CTRL-W CTRL-W to move to a termainal window, get in a weird Insert mode. Solution: Don't go to Insert mode in a terminal window. (closes #1977)
1 parent a9f8ee0 commit 6fe15bb

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

src/normal.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,6 +1308,12 @@ normal_cmd(
13081308
}
13091309
#endif
13101310

1311+
#ifdef FEAT_TERMINAL
1312+
/* don't go to Insert mode from Terminal-Job mode */
1313+
if (term_use_loop())
1314+
restart_edit = 0;
1315+
#endif
1316+
13111317
/*
13121318
* May restart edit(), if we got here with CTRL-O in Insert mode (but not
13131319
* if still inside a mapping that started in Visual mode).

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,8 @@ static char *(features[]) =
769769

770770
static int included_patches[] =
771771
{ /* Add new patch number below this line */
772+
/**/
773+
947,
772774
/**/
773775
946,
774776
/**/

0 commit comments

Comments
 (0)