Skip to content

Commit

Permalink
fix SGR bright color handling
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronjanse committed Apr 14, 2020
1 parent f8553c0 commit 0ef50ef
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions vterm/sgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,19 +114,21 @@ func (v *VTerm) handleSGR(parameterCode string) {
code = int32(c - 30)
if len(seq) > 1 && seq[1] == 1 {
colorMode = render.ColorBit3Bright
seq = seq[2:]
} else {
colorMode = render.ColorBit3Normal
seq = seq[1:]
}
seq = seq[1:]
} else if c >= 40 && c <= 47 {
bg = true
code = int32(c - 40)
if len(seq) > 1 && seq[1] == 1 {
colorMode = render.ColorBit3Bright
seq = seq[2:]
} else {
colorMode = render.ColorBit3Normal
seq = seq[1:]
}
seq = seq[1:]
} else if c >= 90 && c <= 97 {
bg = false
code = int32(c - 90)
Expand Down

0 comments on commit 0ef50ef

Please sign in to comment.