From ee0ee061087dcee681e76b5580461e70e236c7e1 Mon Sep 17 00:00:00 2001 From: Bob Polis Date: Tue, 1 Nov 2022 09:57:05 +0100 Subject: [PATCH] Added use of new iomanip to clear line --- progress.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/progress.cpp b/progress.cpp index 148c51f..8ca6824 100644 --- a/progress.cpp +++ b/progress.cpp @@ -16,8 +16,8 @@ void show_progress(const sc::term& t) { t.progress(12, "progress bar", i, 1000); nanosleep(&tm, nullptr); } - std::cerr << '\r' << std::string(t.cols(), ' '); - std::cerr << "\rprogress bar done."; + std::cerr << sc::io::clear_line(t); + std::cerr << "progress bar done."; std::cerr << std::endl; }