summaryrefslogtreecommitdiffstats
path: root/src/color.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2023-06-30 11:46:22 -0400
committerTavian Barnes <tavianator@tavianator.com>2023-06-30 11:49:36 -0400
commit1864ca8d8e9e93beb3593b316e447c6d817ddfd9 (patch)
treecb4d7d991bad11df2af5a37ffbede4e03671b8fb /src/color.h
parent75b6e1b49e37c6eecd2225c9602ac7aa266c4023 (diff)
downloadbfs-1864ca8d8e9e93beb3593b316e447c6d817ddfd9.tar.xz
color: Don't print unnecessary reset sequences
Diffstat (limited to 'src/color.h')
-rw-r--r--src/color.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/color.h b/src/color.h
index aca6a34..932d551 100644
--- a/src/color.h
+++ b/src/color.h
@@ -42,6 +42,8 @@ typedef struct CFILE {
const struct colors *colors;
/** A buffer for colored formatting. */
char *buffer;
+ /** Whether the next ${rs} is actually necessary. */
+ bool need_reset;
/** Whether to close the underlying stream. */
bool close;
} CFILE;