diff options
author | Alois Wohlschlager <alois1@gmx-topmail.de> | 2024-07-08 19:08:23 +0200 |
---|---|---|
committer | Alois Wohlschlager <alois1@gmx-topmail.de> | 2024-07-08 19:08:23 +0200 |
commit | f5ff70d7f33f0bf53cd160b2076506c8e2ecbba9 (patch) | |
tree | b8d8c24059472175a81c0421ec9b6777229e668b /src/libmain | |
parent | d461cc1d7b2f489c3886f147166ba5b5e0e37541 (diff) |
libmain: clear display attributes in the multiline progress bar
Activities can set display attributes in their log output using the "Select
Graphics Rendition" functionality. To prevent interfering with subsequent text
displayed, these should be reset after writing the log line. The multiline
progress bar neglected to do this, resulting for example in a colorised
"building …" header in the next line. Reset the attributes properly, like the
standard progress bar already does.
Change-Id: I1dc69f4a1d747a76b83e8721a72d9bb0e5554488
Diffstat (limited to 'src/libmain')
-rw-r--r-- | src/libmain/progress-bar.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libmain/progress-bar.cc b/src/libmain/progress-bar.cc index f5a22f41b..48a52f442 100644 --- a/src/libmain/progress-bar.cc +++ b/src/libmain/progress-bar.cc @@ -356,7 +356,7 @@ std::chrono::milliseconds ProgressBar::draw(State & state, const std::optional<s line += "]"; } if (printMultiline && !line.empty()) { - writeToStderr(filterANSIEscapes(line, false, width) + "\n"); + writeToStderr(filterANSIEscapes(line, false, width) + ANSI_NORMAL "\n"); state.lastLines++; } @@ -398,7 +398,7 @@ std::chrono::milliseconds ProgressBar::draw(State & state, const std::optional<s if (printMultiline) { if (state.lastLines < (height -1)) { - writeToStderr(filterANSIEscapes(activity_line, false, width) + "\n"); + writeToStderr(filterANSIEscapes(activity_line, false, width) + ANSI_NORMAL "\n"); state.lastLines++; } else moreActivities++; } |