summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-07-01 16:44:03 +0200
committerBram Moolenaar <Bram@vim.org>2018-07-01 16:44:03 +0200
commite0429681aed5448d1c3b8399d152a2b1a05ea6d7 (patch)
tree973983ac7327502a40ac91593c628e9846616748
parentca06da92432a57e5dcf3e0eebd322fae80941a6b (diff)
downloadvim-git-e0429681aed5448d1c3b8399d152a2b1a05ea6d7.tar.gz
patch 8.1.0135: undo message delays screen update for CTRL-O uv8.1.0135
Problem: Undo message delays screen update for CTRL-O u. Solution: Add smsg_attr_keep(). (closes #3125)
-rw-r--r--src/message.c14
-rw-r--r--src/proto.h6
-rw-r--r--src/undo.c2
-rw-r--r--src/version.c2
4 files changed, 23 insertions, 1 deletions
diff --git a/src/message.c b/src/message.c
index e46c51401..d5727b135 100644
--- a/src/message.c
+++ b/src/message.c
@@ -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
/*
diff --git a/src/proto.h b/src/proto.h
index 655b72cac..8570af947 100644
--- a/src/proto.h
+++ b/src/proto.h
@@ -119,6 +119,12 @@ int
# ifdef __BORLANDC__
_RTLENTRYF
# endif
+smsg_attr_keep(int, char_u *, ...);
+
+int
+# ifdef __BORLANDC__
+_RTLENTRYF
+# endif
vim_snprintf_add(char *, size_t, char *, ...)
#ifdef USE_PRINTF_FORMAT_ATTRIBUTE
__attribute__((format(printf, 3, 4)))
diff --git a/src/undo.c b/src/undo.c
index 117321ea6..be4e22ed6 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -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"),
diff --git a/src/version.c b/src/version.c
index 94a17018e..2d0246118 100644
--- a/src/version.c
+++ b/src/version.c
@@ -790,6 +790,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 135,
+/**/
134,
/**/
133,