From 1864ca8d8e9e93beb3593b316e447c6d817ddfd9 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Fri, 30 Jun 2023 11:46:22 -0400 Subject: color: Don't print unnecessary reset sequences --- src/color.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/color.h') 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; -- cgit v1.2.3