Mercurial > vim
changeset 32240:7d552e52fe92 v9.0.1451
patch 9.0.1451: unnecessary redrawing when 'showcmdloc' is not "last"
Commit: https://github.com/vim/vim/commit/aa7f25ebf16b8be99239af1134b441e3da93060a
Author: Luuk van Baal <luukvbaal@gmail.com>
Date: Thu Apr 13 21:47:38 2023 +0100
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 #12260)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 13 Apr 2023 23:00:07 +0200 |
parents | 078f103c1d18 |
children | 81a19cb468af |
files | src/normal.c src/version.c |
diffstat | 2 files changed, 15 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/normal.c +++ b/src/normal.c @@ -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. @@ -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)