From 4d91a5d74e9b2e58fee65348935181602000eff8 Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Sat, 7 May 2022 20:29:09 +0000 Subject: [PATCH] table: reset color after cell (#372) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Clément DOUIN --- cli/src/ui/table.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cli/src/ui/table.rs b/cli/src/ui/table.rs index 0c97a13..9d9559a 100644 --- a/cli/src/ui/table.rs +++ b/cli/src/ui/table.rs @@ -134,7 +134,14 @@ impl Print for Cell { .context(format!(r#"cannot apply colors to cell "{}""#, self.value))?; // Writes the colorized cell to stdout - write!(writer, "{}", self.value).context(format!(r#"cannot print cell "{}""#, self.value)) + write!(writer, "{}", self.value) + .context(format!(r#"cannot print cell "{}""#, self.value))?; + + // Resets color after cell + writer + .reset() + .context(format!(r#"cannot reset color in cell "{}""#, self.value))?; + write!(writer, "").context(format!(r#"cannot print cell "{}""#, self.value)) } }