]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.0.1451: unnecessary redrawing when 'showcmdloc' is not "last" v9.0.1451
authorLuuk van Baal <luukvbaal@gmail.com>
Thu, 13 Apr 2023 20:47:38 +0000 (21:47 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 13 Apr 2023 20:47:38 +0000 (21:47 +0100)
Problem:    Unnecessary redrawing when 'showcmdloc' is not "last".
Solution:   Redraw later when "showcmd_is_clear" is set. (Luuk van Baal,
            closes #12260)

src/normal.c
src/version.c

index 6f947a6c3c71d9ebd91872a16e31dedacd7f3c3b..1b5326b1362dbb3d98647b8830d41b03aea10ba8 100644 (file)
@@ -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)
index ae81daa116f912c065c83d13339739961276cb50..e55ff4a900c671356b579cd25598e0fbd108cac3 100644 (file)
@@ -695,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1451,
 /**/
     1450,
 /**/