]> granicus.if.org Git - vim/commitdiff
patch 8.1.0135: undo message delays screen update for CTRL-O u v8.1.0135
authorBram Moolenaar <Bram@vim.org>
Sun, 1 Jul 2018 14:44:03 +0000 (16:44 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 1 Jul 2018 14:44:03 +0000 (16:44 +0200)
Problem:    Undo message delays screen update for CTRL-O u.
Solution:   Add smsg_attr_keep(). (closes #3125)

src/message.c
src/proto.h
src/undo.c
src/version.c

index e46c514010a7397d214b0d2eb8b78989c844d57d..d5727b135248d3dac0478cdef2d276e9e9dc49ea 100644 (file)
@@ -399,6 +399,20 @@ smsg_attr(int attr, char_u *s, ...)
     return msg_attr(IObuff, attr);
 }
 
+    int
+# ifdef __BORLANDC__
+_RTLENTRYF
+# endif
+smsg_attr_keep(int attr, char_u *s, ...)
+{
+    va_list arglist;
+
+    va_start(arglist, s);
+    vim_vsnprintf((char *)IObuff, IOSIZE, (char *)s, arglist);
+    va_end(arglist);
+    return msg_attr_keep(IObuff, attr, TRUE);
+}
+
 #endif
 
 /*
index 655b72cac5e387b1960fae4dc84befcd4d12940a..8570af947b38a7f08ccc3f8a6dc090cadbfeea17 100644 (file)
@@ -115,6 +115,12 @@ _RTLENTRYF
 #  endif
 smsg_attr(int, char_u *, ...);
 
+int
+#  ifdef __BORLANDC__
+_RTLENTRYF
+#  endif
+smsg_attr_keep(int, char_u *, ...);
+
 int
 #  ifdef __BORLANDC__
 _RTLENTRYF
index 117321ea620c05e75491025cca1d6ad360704aa3..be4e22ed69d86f2729c5d28affa8f671aba68bd4 100644 (file)
@@ -2968,7 +2968,7 @@ u_undo_end(
     }
 #endif
 
-    smsg((char_u *)_("%ld %s; %s #%ld  %s"),
+    smsg_attr_keep(0, (char_u *)_("%ld %s; %s #%ld  %s"),
            u_oldcount < 0 ? -u_oldcount : u_oldcount,
            _(msgstr),
            did_undo ? _("before") : _("after"),
index 94a17018e32a9fa275a8b1df7c1954d820a62128..2d0246118f4738efac4d1091a04c2fa301b3da21 100644 (file)
@@ -789,6 +789,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    135,
 /**/
     134,
 /**/