mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 19:38:20 +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;
|
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
|
// When 'keymodel' contains "startsel" some keys start Select/Visual
|
||||||
// mode.
|
// mode.
|
||||||
@@ -1997,13 +1997,21 @@ static void display_showcmd(void)
|
|||||||
showcmd_is_clear = (len == 0);
|
showcmd_is_clear = (len == 0);
|
||||||
|
|
||||||
if (*p_sloc == 's') {
|
if (*p_sloc == 's') {
|
||||||
win_redr_status(curwin);
|
if (showcmd_is_clear) {
|
||||||
setcursor(); // put cursor back where it belongs
|
curwin->w_redr_status = true;
|
||||||
|
} else {
|
||||||
|
win_redr_status(curwin);
|
||||||
|
setcursor(); // put cursor back where it belongs
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (*p_sloc == 't') {
|
if (*p_sloc == 't') {
|
||||||
draw_tabline();
|
if (showcmd_is_clear) {
|
||||||
setcursor(); // put cursor back where it belongs
|
redraw_tabline = true;
|
||||||
|
} else {
|
||||||
|
draw_tabline();
|
||||||
|
setcursor(); // put cursor back where it belongs
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 'showcmdloc' is "last" or empty
|
// 'showcmdloc' is "last" or empty
|
||||||
|
Reference in New Issue
Block a user