Skip to content

Commit

Permalink
patch 9.0.1451: unnecessary redrawing when 'showcmdloc' is not "last"
Browse files Browse the repository at this point in the history
Problem:    Unnecessary redrawing when 'showcmdloc' is not "last".
Solution:   Redraw later when "showcmd_is_clear" is set. (Luuk van Baal,
            closes #12260)
  • Loading branch information
luukvbaal authored and brammool committed Apr 13, 2023
1 parent 08210f8 commit aa7f25e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/normal.c
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,7 @@ normal_cmd(
msg_col = 0;
}

old_pos = curwin->w_cursor; // remember where cursor was
old_pos = curwin->w_cursor; // remember where the cursor was

// When 'keymodel' contains "startsel" some keys start Select/Visual
// mode.
Expand Down Expand Up @@ -1803,9 +1803,19 @@ display_showcmd(void)
cursor_off();

if (*p_sloc == 's')
win_redr_status(curwin, FALSE);
{
if (showcmd_is_clear)
curwin->w_redr_status = TRUE;
else
win_redr_status(curwin, FALSE);
}
else if (*p_sloc == 't')
draw_tabline();
{
if (showcmd_is_clear)
redraw_tabline = TRUE;
else
draw_tabline();
}
else // 'showcmdloc' is "last" or empty
{
if (!showcmd_is_clear)
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,8 @@ static char *(features[]) =

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

0 comments on commit aa7f25e

Please sign in to comment.