From: Bram Moolenaar Date: Tue, 21 Aug 2018 15:07:45 +0000 (+0200) Subject: patch 8.1.0308: a quick undo shows "1 seconds ago" X-Git-Tag: v8.1.0308 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=fd6100b2aa6178b88cfadcdbc494966bf79a5488;p=thirdparty%2Fvim.git 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. --- diff --git a/src/undo.c b/src/undo.c index 040ec54809..ebf18da499 100644 --- a/src/undo.c +++ b/src/undo.c @@ -3124,8 +3124,13 @@ u_add_time(char_u *buf, size_t buflen, time_t tt) } else #endif - vim_snprintf((char *)buf, buflen, _("%ld seconds ago"), - (long)(vim_time() - tt)); + { + long seconds = (long)(vim_time() - tt); + + vim_snprintf((char *)buf, buflen, + NGETTEXT("%ld second ago", "%ld seconds ago", seconds), + seconds); + } } /* diff --git a/src/version.c b/src/version.c index bad2b33242..51ead8f5d8 100644 --- a/src/version.c +++ b/src/version.c @@ -794,6 +794,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 308, /**/ 307, /**/