]> granicus.if.org Git - vim/commitdiff
patch 8.1.0082: in terminal window, typing : at more prompt, inserts ':' v8.1.0082
authorBram Moolenaar <Bram@vim.org>
Tue, 19 Jun 2018 15:49:24 +0000 (17:49 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 19 Jun 2018 15:49:24 +0000 (17:49 +0200)
Problem:    In terminal window, typing : at more prompt, inserts ':' instead
            of starting another Ex command.
Solution:   Add skip_term_loop and set it when putting ':' in the typeahead
            buffer.

src/globals.h
src/main.c
src/message.c
src/version.c

index 22199c90a6f60f394f1dd19ccaa50f6c4145ae28..db3a73f2e95a9f0e7adcc151c22d5fb6f7be253e 100644 (file)
@@ -371,6 +371,11 @@ EXTERN int highlight_stltermnc[9];         /* On top of user */
 #  endif
 # endif
 #endif
+#ifdef FEAT_TERMINAL
+               // When TRUE skip calling terminal_loop() once.  Used when
+               // typing ':' at the more prompt.
+EXTERN int     skip_term_loop INIT(= FALSE);
+#endif
 #ifdef FEAT_GUI
 EXTERN char_u  *use_gvimrc INIT(= NULL);       /* "-U" cmdline argument */
 #endif
index e2686b8496d80cb27771e1cdb9beae11a53ba600..c741fc40606e7fba3f4938568dea589544fbde7d 100644 (file)
@@ -1339,7 +1339,8 @@ main_loop(
 #ifdef FEAT_TERMINAL
            if (term_use_loop()
                    && oa.op_type == OP_NOP && oa.regname == NUL
-                   && !VIsual_active)
+                   && !VIsual_active
+                   && !skip_term_loop)
            {
                /* If terminal_loop() returns OK we got a key that is handled
                 * in Normal model.  With FAIL we first need to position the
@@ -1348,8 +1349,13 @@ main_loop(
                    normal_cmd(&oa, TRUE);
            }
            else
+#endif
+           {
+#ifdef FEAT_TERMINAL
+               skip_term_loop = FALSE;
 #endif
                normal_cmd(&oa, TRUE);
+           }
        }
     }
 }
@@ -3320,7 +3326,7 @@ usage(void)
     main_msg(_("-dev <device>\t\tUse <device> for I/O"));
 #endif
 #ifdef FEAT_ARABIC
-    main_msg(_("-A\t\t\tstart in Arabic mode"));
+    main_msg(_("-A\t\t\tStart in Arabic mode"));
 #endif
 #ifdef FEAT_RIGHTLEFT
     main_msg(_("-H\t\t\tStart in Hebrew mode"));
index 9384aa623380bd09b8f53c006196b98e8287d1de..fd087a4a79870ab684be08cf075bb4537bd45019 100644 (file)
@@ -1219,6 +1219,9 @@ wait_return(int redraw)
            cmdline_row = msg_row;
        skip_redraw = TRUE;         /* skip redraw once */
        do_redraw = FALSE;
+#ifdef FEAT_TERMINAL
+       skip_term_loop = TRUE;
+#endif
     }
 
     /*
@@ -2827,6 +2830,9 @@ do_more_prompt(int typed_char)
                /* Since got_int is set all typeahead will be flushed, but we
                 * want to keep this ':', remember that in a special way. */
                typeahead_noflush(':');
+#ifdef FEAT_TERMINAL
+               skip_term_loop = TRUE;
+#endif
                cmdline_row = Rows - 1;         /* put ':' on this line */
                skip_redraw = TRUE;             /* skip redraw once */
                need_wait_return = FALSE;       /* don't wait in main() */
index 39b317f2c66984dccf270fdea053ab0b36711478..1cdc8d4eeeffa53023b07193b9fc695503670e33 100644 (file)
@@ -761,6 +761,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    82,
 /**/
     81,
 /**/