vim-patch:8.1.0308: a quick undo shows "1 seconds ago"

Problem:    A quick undo shows "1 seconds ago". (Tony Mechelynck)
Solution:   Add singular/plural message.
fd6100b2aa
This commit is contained in:
Jan Edmund Lazo
2019-04-04 20:57:28 -04:00
parent ca49ae9e36
commit e2f845632d

View File

@@ -2587,9 +2587,13 @@ static void u_add_time(char_u *buf, size_t buflen, time_t tt)
else else
/* longer ago */ /* longer ago */
(void)strftime((char *)buf, buflen, "%Y/%m/%d %H:%M:%S", &curtime); (void)strftime((char *)buf, buflen, "%Y/%m/%d %H:%M:%S", &curtime);
} else } else {
vim_snprintf((char *)buf, buflen, _("%" PRId64 " seconds ago"), int64_t seconds = time(NULL) - tt;
(int64_t)(time(NULL) - tt)); vim_snprintf((char *)buf, buflen,
NGETTEXT("%" PRId64 " second ago",
"%" PRId64 " seconds ago", (uint32_t)seconds),
seconds);
}
} }
/* /*