summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-08-16 21:09:18 +0200
committerBram Moolenaar <Bram@vim.org>2017-08-16 21:09:18 +0200
commit6fe15bbc87cb996912fe3c2c4068e356071ac516 (patch)
treef4173889f87bbdd4da7632372faa0fe5f27d2c3e
parenta9f8ee05f46f2d6621a3719cd15150155d33eed4 (diff)
patch 8.0.0947: entering terminal using C-O C-W C-W goes to Insert modev8.0.0947
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)
-rw-r--r--src/normal.c6
-rw-r--r--src/version.c2
2 files changed, 8 insertions, 0 deletions
diff --git a/src/normal.c b/src/normal.c
index 24ab06ddf2..ea963667d4 100644
--- 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
index f3e5a3ad35..ebfa0bf2e6 100644
--- 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,