summaryrefslogtreecommitdiffstats
path: root/src/color.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/color.c')
-rw-r--r--src/color.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/color.c b/src/color.c
index 00d7920..6593f5b 100644
--- a/src/color.c
+++ b/src/color.c
@@ -922,9 +922,12 @@ static int print_colored(CFILE *cfile, const struct esc_seq *esc, const char *st
if (print_esc(cfile, esc) != 0) {
return -1;
}
- if (dstrxcat(&cfile->buffer, str, len) != 0) {
+
+ // Don't let the string itself interfere with the colors
+ if (print_wordesc(cfile, str, len, WESC_TTY) != 0) {
return -1;
}
+
if (print_reset(cfile) != 0) {
return -1;
}
@@ -1242,6 +1245,11 @@ static int cvbuff(CFILE *cfile, const char *format, va_list args) {
return -1;
}
break;
+ case 'Q':
+ if (print_wordesc(cfile, va_arg(args, const char *), SIZE_MAX, WESC_TTY) != 0) {
+ return -1;
+ }
+ break;
case 'F':
if (print_name(cfile, va_arg(args, const struct BFTW *)) != 0) {