aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-08-06 12:45:22 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-08-06 12:45:22 +0200
commitc9a0a4a849db09997e6843d97f58717f1a7f2154 (patch)
treef9896e67899d92f96ce26dc7cb025d1e75a4c9d8
parent561a189f49441a4d211c0217dce8127f2ce7c32e (diff)
Don't reprint progress in newline mode
-rw-r--r--libbutl/diagnostics.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/libbutl/diagnostics.cxx b/libbutl/diagnostics.cxx
index 73eb155..33d8e3a 100644
--- a/libbutl/diagnostics.cxx
+++ b/libbutl/diagnostics.cxx
@@ -103,10 +103,11 @@ namespace butl
diag_stream_lock::~diag_stream_lock ()
{
- // If diagnostics shares output stream with the progress bar, then reprint
- // the current progress string, that was overwritten with the diagnostics.
+ // If diagnostics shares output stream with the progress bar and we use
+ // same-line progress style, then reprint the current progress string
+ // that was overwritten with the diagnostics.
//
- if (diag_stream == &cerr && !diag_progress.empty ())
+ if (diag_stream == &cerr && *diag_term && !diag_progress.empty ())
progress_print (diag_progress);
diag_mutex.unlock ();