diff options
author | Jesse Luehrs <doy@tozt.net> | 2018-02-20 03:43:59 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2018-02-20 03:43:59 -0500 |
commit | 988afdfd2f5cd11b612a78bf626537b58f35f798 (patch) | |
tree | c14cf717121dd63bd7ac97818628000e5ace06bf /src/colors.rs | |
parent | 3336ca4b117b3348bb539cf993f57138e34334d7 (diff) | |
download | fancy-prompt-988afdfd2f5cd11b612a78bf626537b58f35f798.tar.gz fancy-prompt-988afdfd2f5cd11b612a78bf626537b58f35f798.zip |
also need to wrap the reset code in prompt escapes
Diffstat (limited to 'src/colors.rs')
-rw-r--r-- | src/colors.rs | 4 |
1 files changed, 3 insertions, 1 deletions
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>) { |