Skip to content

Commit

Permalink
fix(cli): fix incorrect color state after ColorableTerminal::reset
Browse files Browse the repository at this point in the history
  • Loading branch information
rami3l authored and djc committed Mar 13, 2024
1 parent c0f17b7 commit f6dbe2e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/currentprocess/terminalsource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,10 @@ impl ColorableTerminal {

pub fn reset(&mut self) -> io::Result<()> {
match self.inner.lock().unwrap().deref_mut() {
TerminalInner::StandardStream(s, _color) => s.reset(),
TerminalInner::StandardStream(s, color) => {
color.clear();
s.reset()
}
#[cfg(feature = "test")]
TerminalInner::TestWriter(_, _) => Ok(()),
}
Expand Down

0 comments on commit f6dbe2e

Please sign in to comment.