<<< Date Index >>>     <<< Thread Index >>>

[PATCH] Clear progress bar when done



Hi,

it's just a minor issue: mutt doesn't clear the progress bar when it's done fetching something. For example, if it fetches a 100k message it properly displays the bar with incremental updates. If all messages afterwards are smaller than $net_inc, mutt won't update the status line and leave the last incremental update until a message is seen which is larger than $net_inc.

This can make the user think that mutt is hanging while fetching the message though it actually doesn't.

The attached patch clears the status line if the current progress' bar position is equal to or larger than the total size to be fetched.

  bye, Rocco
--
:wq!
diff --git a/curs_lib.c b/curs_lib.c
index 0622dba..bc68335 100644
--- a/curs_lib.c
+++ b/curs_lib.c
@@ -355,6 +355,9 @@ void mutt_progress_bar (progress_t* prog
     else
       mutt_message ("%s %s", progress->msg, posstr);
   }
+
+  if (pos >= progress->size)
+    mutt_clear_error ();
 }
 #endif