fix(terminal): Reset dim SGR independently from bold (#1803)
This commit is contained in:
parent
897038638d
commit
ece1cbe533
1 changed files with 4 additions and 3 deletions
|
|
@ -545,9 +545,10 @@ impl Display for CharacterStyles {
|
|||
write!(f, "\u{1b}[2m")?;
|
||||
},
|
||||
AnsiCode::Reset => {
|
||||
if let Some(AnsiCode::Reset) = self.bold {
|
||||
// we only reset dim if both dim and bold should be reset
|
||||
write!(f, "\u{1b}[22m")?;
|
||||
write!(f, "\u{1b}[22m")?;
|
||||
// ⬑ this SGR also clears bold, so reapply it
|
||||
if let Some(AnsiCode::On) = self.bold {
|
||||
write!(f, "\u{1b}[1m")?;
|
||||
}
|
||||
},
|
||||
_ => {},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue