summaryrefslogtreecommitdiff
path: root/src/message.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-03-19 17:05:20 +0100
committerBram Moolenaar <Bram@vim.org>2016-03-19 17:05:20 +0100
commitbfb96c047b79b2aab5fd57a2472871508819f3ef (patch)
tree3275a18f86f6af8713e7531d1388ebfb6f4aab59 /src/message.c
parentcff572abb922d49455b01484e99b98c371fa4560 (diff)
downloadvim-git-bfb96c047b79b2aab5fd57a2472871508819f3ef.tar.gz
patch 7.4.1603v7.4.1603
Problem: Timer with an ":echo" command messes up display. Solution: Redraw depending on the mode. (Hirohito Higashi) Avoid the more prompt being used recursively.
Diffstat (limited to 'src/message.c')
-rw-r--r--src/message.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/message.c b/src/message.c
index 689a79cd4..099c3aa75 100644
--- a/src/message.c
+++ b/src/message.c
@@ -870,6 +870,8 @@ wait_return(int redraw)
#ifdef USE_ON_FLY_SCROLL
dont_scroll = TRUE; /* disallow scrolling here */
#endif
+ cmdline_row = msg_row;
+
/* Avoid the sequence that the user types ":" at the hit-return prompt
* to start an Ex command, but the file-changed dialog gets in the
* way. */
@@ -2426,6 +2428,7 @@ msg_puts_printf(char_u *str, int maxlen)
static int
do_more_prompt(int typed_char)
{
+ static int entered = FALSE;
int used_typed_char = typed_char;
int oldState = State;
int c;
@@ -2437,6 +2440,13 @@ do_more_prompt(int typed_char)
msgchunk_T *mp;
int i;
+ /* We get called recursively when a timer callback outputs a message. In
+ * that case don't show another prompt. Also when at the hit-Enter prompt.
+ */
+ if (entered || State == HITRETURN)
+ return FALSE;
+ entered = TRUE;
+
if (typed_char == 'G')
{
/* "g<": Find first line on the last page. */
@@ -2675,6 +2685,7 @@ do_more_prompt(int typed_char)
msg_col = Columns - 1;
#endif
+ entered = FALSE;
#ifdef FEAT_CON_DIALOG
return retval;
#else