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
This commit is contained in:
parent
d461cc1d7b
commit
f5ff70d7f3
|
@ -356,7 +356,7 @@ std::chrono::milliseconds ProgressBar::draw(State & state, const std::optional<s
|
||||||
line += "]";
|
line += "]";
|
||||||
}
|
}
|
||||||
if (printMultiline && !line.empty()) {
|
if (printMultiline && !line.empty()) {
|
||||||
writeToStderr(filterANSIEscapes(line, false, width) + "\n");
|
writeToStderr(filterANSIEscapes(line, false, width) + ANSI_NORMAL "\n");
|
||||||
state.lastLines++;
|
state.lastLines++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -398,7 +398,7 @@ std::chrono::milliseconds ProgressBar::draw(State & state, const std::optional<s
|
||||||
|
|
||||||
if (printMultiline) {
|
if (printMultiline) {
|
||||||
if (state.lastLines < (height -1)) {
|
if (state.lastLines < (height -1)) {
|
||||||
writeToStderr(filterANSIEscapes(activity_line, false, width) + "\n");
|
writeToStderr(filterANSIEscapes(activity_line, false, width) + ANSI_NORMAL "\n");
|
||||||
state.lastLines++;
|
state.lastLines++;
|
||||||
} else moreActivities++;
|
} else moreActivities++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue