Skip to content

Commit

Permalink
patch 8.1.0135: undo message delays screen update for CTRL-O u
Browse files Browse the repository at this point in the history
Problem:    Undo message delays screen update for CTRL-O u.
Solution:   Add smsg_attr_keep(). (closes #3125)
  • Loading branch information
brammool committed Jul 1, 2018
1 parent ca06da9 commit e042968
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
14 changes: 14 additions & 0 deletions src/message.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

/*
Expand Down
6 changes: 6 additions & 0 deletions src/proto.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/undo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
135,
/**/
134,
/**/
Expand Down

0 comments on commit e042968

Please sign in to comment.