From b51d0e3ffc16700ad6ebe518d5d6a3ac74e4084d Mon Sep 17 00:00:00 2001 From: Bob Polis Date: Mon, 13 Dec 2021 16:13:21 +0100 Subject: [PATCH] Added: progress bar disappears when done --- progress.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/progress.cpp b/progress.cpp index 21ae029..148c51f 100644 --- a/progress.cpp +++ b/progress.cpp @@ -16,6 +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 << std::endl; }