diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-04-07 03:43:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-07 03:43:36 +0200 |
commit | 805b5f2e1ec074648e2142c1eaab1d2c089aa58d (patch) | |
tree | 64a3405bbc6c28580507d4de4a281932f719f7e5 /src/nvim/undo.c | |
parent | cf072cf223287d37c1c59926ff4600d249e1522c (diff) | |
parent | 4d6e99c94913676cc7a6581c13579e5f9fbe26c5 (diff) | |
download | rneovim-805b5f2e1ec074648e2142c1eaab1d2c089aa58d.tar.gz rneovim-805b5f2e1ec074648e2142c1eaab1d2c089aa58d.tar.bz2 rneovim-805b5f2e1ec074648e2142c1eaab1d2c089aa58d.zip |
Merge #9840 from janlazo/vim-8.0.0709
vim-patch:8.0.{709,728},8.1.{135,308}
Diffstat (limited to 'src/nvim/undo.c')
-rw-r--r-- | src/nvim/undo.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/nvim/undo.c b/src/nvim/undo.c index df0507ed41..41393c7ef4 100644 --- a/src/nvim/undo.c +++ b/src/nvim/undo.c @@ -2452,7 +2452,9 @@ static void u_undo_end( } } - smsg(_("%" PRId64 " %s; %s #%" PRId64 " %s"), + smsg_attr_keep( + 0, + _("%" PRId64 " %s; %s #%" PRId64 " %s"), u_oldcount < 0 ? (int64_t)-u_oldcount : (int64_t)u_oldcount, _(msgstr), did_undo ? _("before") : _("after"), @@ -2585,9 +2587,13 @@ static void u_add_time(char_u *buf, size_t buflen, time_t tt) else /* longer ago */ (void)strftime((char *)buf, buflen, "%Y/%m/%d %H:%M:%S", &curtime); - } else - vim_snprintf((char *)buf, buflen, _("%" PRId64 " seconds ago"), - (int64_t)(time(NULL) - tt)); + } else { + int64_t seconds = time(NULL) - tt; + vim_snprintf((char *)buf, buflen, + NGETTEXT("%" PRId64 " second ago", + "%" PRId64 " seconds ago", (uint32_t)seconds), + seconds); + } } /* |