enable_colors: always set color strings

Only setting color strings when colors is true allowed subsequent
calls to enable colors but not disable them.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Andrew Gregory 2014-01-23 09:39:17 -05:00 committed by Allan McRae
parent 5be7b6a1b2
commit 333373f90e
1 changed files with 10 additions and 0 deletions

View File

@ -76,6 +76,16 @@ void enable_colors(int colors)
colstr->warn = BOLDYELLOW;
colstr->err = BOLDRED;
colstr->nocolor = NOCOLOR;
} else {
colstr->colon = ":: ";
colstr->title = "";
colstr->repo = "";
colstr->version = "";
colstr->groups = "";
colstr->meta = "";
colstr->warn = "";
colstr->err = "";
colstr->nocolor = "";
}
}