Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src/pacman/conf.c
diff options
context:
space:
mode:
authorCarson Black <uhhadd@gmail.com>2020-04-14 20:51:03 -0400
committerAllan McRae <allan@archlinux.org>2020-04-15 11:05:55 +1000
commitb323528491470ff77815fea97289c2cbf7e29689 (patch)
tree3307d4ba9eb8a920f5fdde9360617e67e75cd00e /src/pacman/conf.c
parent6ba250e4001740ca428226abf157b25aa121c7bf (diff)
Dull version colour numbers in summary
Version colour numbers are dulled in the non-verbose transaction summary when colours are enabled. To prevent a regression, this patch also adds handling of strings with ANSI codes to string_length as to not break the transaction summary's output functions when colour codes are in the package name strings. Signed-off-by: Carson Black <uhhadd@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'src/pacman/conf.c')
-rw-r--r--src/pacman/conf.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pacman/conf.c b/src/pacman/conf.c
index f9de386f..76c93aca 100644
--- a/src/pacman/conf.c
+++ b/src/pacman/conf.c
@@ -62,6 +62,7 @@ config_t *config = NULL;
#define BOLDMAGENTA "\033[1;35m"
#define BOLDCYAN "\033[1;36m"
#define BOLDWHITE "\033[1;37m"
+#define GREY46 "\033[38;5;243m"
void enable_colors(int colors)
{
@@ -76,6 +77,7 @@ void enable_colors(int colors)
colstr->meta = BOLDCYAN;
colstr->warn = BOLDYELLOW;
colstr->err = BOLDRED;
+ colstr->faint = GREY46;
colstr->nocolor = NOCOLOR;
} else {
colstr->colon = ":: ";
@@ -86,6 +88,7 @@ void enable_colors(int colors)
colstr->meta = "";
colstr->warn = "";
colstr->err = "";
+ colstr->faint = "";
colstr->nocolor = "";
}
}
@@ -119,6 +122,7 @@ config_t *config_new(void)
newconfig->colstr.meta = "";
newconfig->colstr.warn = "";
newconfig->colstr.err = "";
+ newconfig->colstr.faint = "";
newconfig->colstr.nocolor = "";
return newconfig;