mirror of
https://github.com/neovim/neovim.git
synced 2025-09-05 19:08:15 +00:00
vim-patch:9.0.1451: unnecessary redrawing when 'showcmdloc' is not "last"
Problem: Unnecessary redrawing when 'showcmdloc' is not "last". Solution: Redraw later when "showcmd_is_clear" is set. (Luuk van Baal, closes vim/vim#12260)aa7f25ebf1
(cherry picked from commit086088ce44
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
d24bdc4999
commit
69d4e64c60
@@ -1173,7 +1173,7 @@ static int normal_execute(VimState *state, int key)
|
||||
msg_col = 0;
|
||||
}
|
||||
|
||||
s->old_pos = curwin->w_cursor; // remember where cursor was
|
||||
s->old_pos = curwin->w_cursor; // remember where the cursor was
|
||||
|
||||
// When 'keymodel' contains "startsel" some keys start Select/Visual
|
||||
// mode.
|
||||
@@ -1997,13 +1997,21 @@ static void display_showcmd(void)
|
||||
showcmd_is_clear = (len == 0);
|
||||
|
||||
if (*p_sloc == 's') {
|
||||
win_redr_status(curwin);
|
||||
setcursor(); // put cursor back where it belongs
|
||||
if (showcmd_is_clear) {
|
||||
curwin->w_redr_status = true;
|
||||
} else {
|
||||
win_redr_status(curwin);
|
||||
setcursor(); // put cursor back where it belongs
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (*p_sloc == 't') {
|
||||
draw_tabline();
|
||||
setcursor(); // put cursor back where it belongs
|
||||
if (showcmd_is_clear) {
|
||||
redraw_tabline = true;
|
||||
} else {
|
||||
draw_tabline();
|
||||
setcursor(); // put cursor back where it belongs
|
||||
}
|
||||
return;
|
||||
}
|
||||
// 'showcmdloc' is "last" or empty
|
||||
|
Reference in New Issue
Block a user