From bea399640b3254b47022e7cd4d95fa601ade209c Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Sat, 23 Jan 2021 23:49:14 -0800 Subject: [PATCH] commands: don't leave color on after printing error E.g. `jj log` outside a repo would print the message with red color and then not turn off the color after the message. --- src/ui.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ui.rs b/src/ui.rs index f86b25585..311291a00 100644 --- a/src/ui.rs +++ b/src/ui.rs @@ -81,6 +81,7 @@ impl<'a> Ui<'a> { let mut styler = self.styler(); styler.add_label(String::from("error")); styler.write_str(text); + styler.remove_label(); } pub fn write_commit_summary<'r>(&mut self, repo: &'r dyn Repo, commit: &Commit) {