Skip to content

Commit

Permalink
patch 9.0.0551: mode message is delayed when :echowin was used
Browse files Browse the repository at this point in the history
Problem:    Mode message is delayed when :echowin was used. (Maxim Kim)
Solution:   Save and restore msg_didout in :echowin. (closes #11193)
  • Loading branch information
brammool committed Sep 22, 2022
1 parent 62de54b commit f87eeb4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
19 changes: 15 additions & 4 deletions src/popupwin.c
Expand Up @@ -4557,13 +4557,24 @@ popup_hide_message_win(void)
popup_hide(message_win);
}

// Values saved in start_echowindow() and restored in end_echowindow()
static int save_msg_didout = FALSE;
static int save_msg_col = 0;
// Values saved in end_echowindow() and restored in start_echowindow()
static int ew_msg_didout = FALSE;
static int ew_msg_col = 0;

/*
* Invoked before outputting a message for ":echowindow".
*/
void
start_echowindow(void)
{
in_echowindow = TRUE;
save_msg_didout = msg_didout;
save_msg_col = msg_col;
msg_didout = ew_msg_didout;
msg_col = ew_msg_col;
}

/*
Expand All @@ -4579,10 +4590,10 @@ end_echowindow(void)
redraw_cmd(FALSE);

// do not overwrite messages
// TODO: only for message window
msg_didout = TRUE;
if (msg_col == 0)
msg_col = 1;
ew_msg_didout = TRUE;
ew_msg_col = msg_col == 0 ? 1 : msg_col;
msg_didout = save_msg_didout;
msg_col = save_msg_col;
}
#endif

Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -699,6 +699,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
551,
/**/
550,
/**/
Expand Down

0 comments on commit f87eeb4

Please sign in to comment.