summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-10-25 10:00:06 +0200
committerLennart Poettering <lennart@poettering.net>2016-11-02 11:39:49 -0600
commit835a19e02fa96a5f13700d0ce9f4b1813d0c1ad6 (patch)
tree99f122ce628b5ef8a5e520e110803fe3b5c3edf2 /src
parente5105081152c3eb4558d9e5d9c8aaa33f9d802ff (diff)
systemctl: properly turn off color after active column
If we turn on red color for the active column and it is not combined with underlining, then we need to turn it off explicitly afterwards. Do that.
Diffstat (limited to 'src')
-rw-r--r--src/systemctl/systemctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index d311bbec1a..558186bd8a 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -513,13 +513,13 @@ static int output_units_list(const UnitInfo *unit_infos, unsigned c) {
off_circle = ansi_normal();
circle = true;
on_loaded = underline ? ansi_highlight_red_underline() : ansi_highlight_red();
- off_loaded = on_underline;
+ off_loaded = underline ? on_underline : ansi_normal();
} else if (streq(u->active_state, "failed") && !arg_plain) {
on_circle = ansi_highlight_red();
off_circle = ansi_normal();
circle = true;
on_active = underline ? ansi_highlight_red_underline() : ansi_highlight_red();
- off_active = on_underline;
+ off_active = underline ? on_underline : ansi_normal();
}
if (u->machine) {