From c9a0a4a849db09997e6843d97f58717f1a7f2154 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 6 Aug 2017 12:45:22 +0200 Subject: Don't reprint progress in newline mode --- libbutl/diagnostics.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'libbutl/diagnostics.cxx') 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 (); -- cgit v1.1