Skip to content

Commit

Permalink
fix(terminal): Reset dim SGR independently from bold (#1803)
Browse files Browse the repository at this point in the history
  • Loading branch information
pedromfedricci authored Nov 2, 2022
1 parent 8970386 commit ece1cbe
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions zellij-server/src/panes/terminal_character.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")?;
}
},
_ => {},
Expand Down

0 comments on commit ece1cbe

Please sign in to comment.