cmdline: Redraw the cmdline after processing events

vim-patch:7.4.1603

TODO(bfredl): if we allow events in HITRETURN and ASKMORE states,
we need to add the necessary redraws as well.
This commit is contained in:
Björn Linse
2016-05-22 21:53:43 +02:00
parent 61e8adb25e
commit 5cc87d4dab
5 changed files with 56 additions and 7 deletions

View File

@@ -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;
}