diff options
author | alois31 <alois1@gmx-topmail.de> | 2024-09-08 13:42:17 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@localhost> | 2024-09-08 13:42:17 +0000 |
commit | e9505dcc5a0ff259b9e284e9e617486e81a1ff6f (patch) | |
tree | b23a02e23b173a86ee7ecca692b16de265484755 /src | |
parent | f2a49032a698bd96b37e8df8f02ec403fd0bed0f (diff) | |
parent | 4715d557ef1c0dd306cde585820a2a00accd51d6 (diff) |
Merge "libmain/progress-bar: erase all lines of the multi-line format" into main
Diffstat (limited to 'src')
-rw-r--r-- | src/libmain/progress-bar.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libmain/progress-bar.cc b/src/libmain/progress-bar.cc index cdb15d8c7..68349ad26 100644 --- a/src/libmain/progress-bar.cc +++ b/src/libmain/progress-bar.cc @@ -92,7 +92,7 @@ void ProgressBar::resume() nextWakeup = draw(*state, {}); state.wait_for(quitCV, std::chrono::milliseconds(50)); } - writeLogsToStderr("\r\e[K"); + eraseProgressDisplay(*state); }); } @@ -558,7 +558,8 @@ std::optional<char> ProgressBar::ask(std::string_view msg) { auto state(state_.lock()); if (state->paused > 0 || !isatty(STDIN_FILENO)) return {}; - std::cerr << fmt("\r\e[K%s ", msg); + eraseProgressDisplay(*state); + std::cerr << msg; auto s = trim(readLine(STDIN_FILENO)); if (s.size() != 1) return {}; draw(*state, {}); |