# HG changeset patch # User Christian Brabandt # Date 1502910904 -7200 # Node ID e83c6c10320c3c4fe354242663e622efe24caffc # Parent 0bff7381b3f9ae7003ffa9635d0da4450e9ba102 patch 8.0.0947: entering terminal using C-O C-W C-W goes to Insert mode commit https://github.com/vim/vim/commit/6fe15bbc87cb996912fe3c2c4068e356071ac516 Author: Bram Moolenaar Date: Wed Aug 16 21:09:18 2017 +0200 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) diff --git a/src/normal.c b/src/normal.c --- a/src/normal.c +++ b/src/normal.c @@ -1308,6 +1308,12 @@ normal_end: } #endif +#ifdef FEAT_TERMINAL + /* don't go to Insert mode from Terminal-Job mode */ + if (term_use_loop()) + restart_edit = 0; +#endif + /* * May restart edit(), if we got here with CTRL-O in Insert mode (but not * if still inside a mapping that started in Visual mode). diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -770,6 +770,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 947, +/**/ 946, /**/ 945,