diff options
author | Luuk van Baal <luukvbaal@gmail.com> | 2023-04-13 21:47:38 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2023-04-13 21:47:38 +0100 |
commit | aa7f25ebf16b8be99239af1134b441e3da93060a (patch) | |
tree | 197b9ba195e8b44223df55ba8c3e31d52f5f702c | |
parent | 08210f8def4886b0cd04dd4bbebed719f0512315 (diff) | |
download | vim-git-aa7f25ebf16b8be99239af1134b441e3da93060a.tar.gz |
patch 9.0.1451: unnecessary redrawing when 'showcmdloc' is not "last"v9.0.1451
Problem: Unnecessary redrawing when 'showcmdloc' is not "last".
Solution: Redraw later when "showcmd_is_clear" is set. (Luuk van Baal,
closes #12260)
-rw-r--r-- | src/normal.c | 16 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 15 insertions, 3 deletions
diff --git a/src/normal.c b/src/normal.c index 6f947a6c3..1b5326b13 100644 --- 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) diff --git a/src/version.c b/src/version.c index ae81daa11..e55ff4a90 100644 --- a/src/version.c +++ b/src/version.c @@ -696,6 +696,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1451, +/**/ 1450, /**/ 1449, |