diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/ex_getln.c | 1 | ||||
-rw-r--r-- | src/nvim/message.c | 24 |
2 files changed, 19 insertions, 6 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index a4e5a4dcd7..db21fddedb 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -359,6 +359,7 @@ static int command_line_execute(VimState *state, int key) if (s->c == K_EVENT) { queue_process_events(loop.events); + redrawcmdline(); return 1; } diff --git a/src/nvim/message.c b/src/nvim/message.c index 47f246fc76..521db85cf0 100644 --- a/src/nvim/message.c +++ b/src/nvim/message.c @@ -785,11 +785,13 @@ void wait_return(int redraw) State = HITRETURN; setmouse(); - /* 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. */ - if (need_check_timestamps) - check_timestamps(FALSE); + 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. + if (need_check_timestamps) { + check_timestamps(false); + } hit_return_msg(); @@ -1970,6 +1972,7 @@ static void msg_puts_printf(char *str, int maxlen) */ static int do_more_prompt(int typed_char) { + static bool entered = false; int used_typed_char = typed_char; int oldState = State; int c; @@ -1979,6 +1982,13 @@ static int 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. */ mp_last = msg_sb_start(last_msgchunk); @@ -2153,9 +2163,11 @@ static int do_more_prompt(int typed_char) if (quit_more) { msg_row = Rows - 1; msg_col = 0; - } else if (cmdmsg_rl) + } else if (cmdmsg_rl) { msg_col = Columns - 1; + } + entered = false; return retval; } |