]> granicus.if.org Git - vim/commitdiff
patch 8.0.0826: cannot use text objects in Terminal mode v8.0.0826
authorBram Moolenaar <Bram@vim.org>
Mon, 31 Jul 2017 20:56:24 +0000 (22:56 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 31 Jul 2017 20:56:24 +0000 (22:56 +0200)
Problem:    Cannot use text objects in Terminal mode.
Solution:   Check for pending operator and Visual mode first. (Yasuhiro
            Matsumoto, closes #1906)

src/normal.c
src/version.c

index e8f80f181bc18170e0e782f3f77debf42e6c09a5..d655c74677bd2631bf6e917f7194deef16b1a316 100644 (file)
@@ -9037,14 +9037,6 @@ nv_esc(cmdarg_T *cap)
     static void
 nv_edit(cmdarg_T *cap)
 {
-#ifdef FEAT_TERMINAL
-    if (term_in_terminal_mode())
-    {
-       term_leave_terminal_mode();
-       return;
-    }
-#endif
-
     /* <Insert> is equal to "i" */
     if (cap->cmdchar == K_INS || cap->cmdchar == K_KINS)
        cap->cmdchar = 'i';
@@ -9063,6 +9055,14 @@ nv_edit(cmdarg_T *cap)
        clearopbeep(cap->oap);
 #endif
     }
+#ifdef FEAT_TERMINAL
+    else if (term_in_terminal_mode())
+    {
+       clearop(cap->oap);
+       term_leave_terminal_mode();
+       return;
+    }
+#endif
     else if (!curbuf->b_p_ma && !p_im)
     {
        /* Only give this error when 'insertmode' is off. */
index b2dfaa343e2a6b658a353439f500a650292183fe..014dab616833b32ec9c78488c59b4a1babb402c0 100644 (file)
@@ -769,6 +769,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    826,
 /**/
     825,
 /**/