]> granicus.if.org Git - vim/commitdiff
patch 8.1.0308: a quick undo shows "1 seconds ago" v8.1.0308
authorBram Moolenaar <Bram@vim.org>
Tue, 21 Aug 2018 15:07:45 +0000 (17:07 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 21 Aug 2018 15:07:45 +0000 (17:07 +0200)
Problem:    A quick undo shows "1 seconds ago". (Tony Mechelynck)
Solution:   Add singular/plural message.

src/undo.c
src/version.c

index 040ec548093c69e2a2e052de6f41308aa06e2f1c..ebf18da4993647e33bf44c113489091dea3d72ee 100644 (file)
@@ -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);
+    }
 }
 
 /*
index bad2b33242ed964d11828293edec0304689b13b8..51ead8f5d840dffea6ec03054b5bbfd2ac50c40e 100644 (file)
@@ -794,6 +794,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    308,
 /**/
     307,
 /**/