]> granicus.if.org Git - neomutt/commitdiff
Don't attempt to print progress if inc is 0, just print initial message
authorRocco Rutte <pdmef@gmx.net>
Fri, 23 Nov 2007 14:11:26 +0000 (15:11 +0100)
committerRocco Rutte <pdmef@gmx.net>
Fri, 23 Nov 2007 14:11:26 +0000 (15:11 +0100)
ChangeLog
curs_lib.c

index 438d4e2955050e72245aa6afbe5e1724e288ded1..ea11570532285760d5d5ed99d01109f4c958a0fc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-11-21 14:14 -0800  Ronny Haryanto  <ronnylist@haryan.to>  (0e99eaaecd67)
+
+       * po/id.po: Updated Indonesian translation
+
+2007-11-21 16:47 +0100  Rocco Rutte  <pdmef@gmx.net>  (309ab3a63d91)
+
+       * ChangeLog, UPDATING: Add UPDATING entry for $check_mbox_size
+
 2007-11-21 14:46 +0100  Rocco Rutte  <pdmef@gmx.net>  (b8d811e5931e)
 
        * init.h: Clarify the description for $timeout
index fe3bf19313608f83eb5851c6056e7f9f03b9389d..ea3a2c0c196196799b59c227413af6911f11af51 100644 (file)
@@ -364,6 +364,14 @@ void mutt_progress_init (progress_t* progress, const char *msg,
       snprintf (progress->sizestr, sizeof (progress->sizestr), "%ld",
                progress->size);
   }
+  if (!inc)
+  {
+    if (size)
+      mutt_message ("%s (%s)", msg, progress->sizestr);
+    else
+      mutt_message (msg);
+    return;
+  }
   if (gettimeofday (&tv, NULL) < 0)
     dprint (1, (debugfile, "gettimeofday failed: %d\n", errno));
   /* if timestamp is 0 no time-based suppression is done */
@@ -379,8 +387,8 @@ void mutt_progress_update (progress_t* progress, long pos, int percent)
   struct timeval tv = { 0, 0 };
   unsigned int now = 0;
 
-  if (pos && !progress->inc)
-    return;
+  if (!progress->inc)
+    goto out;
 
   /* refresh if size > inc */
   if (progress->flags & M_PROGRESS_SIZE &&
@@ -429,6 +437,7 @@ void mutt_progress_update (progress_t* progress, long pos, int percent)
     }
   }
 
+out:
   if (pos >= progress->size)
     mutt_clear_error ();
 }