]> granicus.if.org Git - vim/commitdiff
patch 8.0.0947: entering terminal using C-O C-W C-W goes to Insert mode v8.0.0947
authorBram Moolenaar <Bram@vim.org>
Wed, 16 Aug 2017 19:09:18 +0000 (21:09 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 16 Aug 2017 19:09:18 +0000 (21:09 +0200)
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)

src/normal.c
src/version.c

index 24ab06ddf2fdb103e0ea087f92296f49cc772963..ea963667d48e7ab3a63941d1ea01abf306a9cb5d 100644 (file)
@@ -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).
index f3e5a3ad3507a8e91dcdda384a95b8f7306dcf68..ebfa0bf2e6dbdb572ebd427d33617a506c0f2c1b 100644 (file)
@@ -769,6 +769,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    947,
 /**/
     946,
 /**/