summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-06-19 17:49:24 +0200
committerBram Moolenaar <Bram@vim.org>2018-06-19 17:49:24 +0200
commit1d4754f96fa5bff1c349cdb71560c55675f50d03 (patch)
treeee74895e049c81e4d4e7e0ab9f7ea27d8bc3a6e9
parentf07f9e731eb97bbdbd1b0b3983750589e4f557a6 (diff)
downloadvim-git-1d4754f96fa5bff1c349cdb71560c55675f50d03.tar.gz
patch 8.1.0082: in terminal window, typing : at more prompt, inserts ':'v8.1.0082
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.
-rw-r--r--src/globals.h5
-rw-r--r--src/main.c10
-rw-r--r--src/message.c6
-rw-r--r--src/version.c2
4 files changed, 21 insertions, 2 deletions
diff --git a/src/globals.h b/src/globals.h
index 22199c90a..db3a73f2e 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -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
diff --git a/src/main.c b/src/main.c
index e2686b849..c741fc406 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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
@@ -1349,7 +1350,12 @@ main_loop(
}
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"));
diff --git a/src/message.c b/src/message.c
index 9384aa623..fd087a4a7 100644
--- a/src/message.c
+++ b/src/message.c
@@ -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() */
diff --git a/src/version.c b/src/version.c
index 39b317f2c..1cdc8d4ee 100644
--- a/src/version.c
+++ b/src/version.c
@@ -762,6 +762,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 82,
+/**/
81,
/**/
80,