From 988afdfd2f5cd11b612a78bf626537b58f35f798 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Tue, 20 Feb 2018 03:43:59 -0500 Subject: also need to wrap the reset code in prompt escapes --- src/colors.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/colors.rs b/src/colors.rs index bb8ea4b..ddb3418 100644 --- a/src/colors.rs +++ b/src/colors.rs @@ -127,7 +127,9 @@ impl Colors { let mut t = term::stdout().unwrap(); self.print_color(&mut *t, color); write!(t, "{}", text).unwrap(); - t.reset().unwrap(); + self.print_wrapped(|| { + t.reset().unwrap(); + }) } fn print_color(&self, t: &mut term::StdoutTerminal, color: Option<&term::color::Color>) { -- cgit v1.2.3-54-g00ecf