use bright colors for highlighting

This commit is contained in:
Pieter van Loon 2022-01-06 01:21:56 +01:00 committed by Jesse Duffield
parent 48a4565d1f
commit 7539929703

View file

@ -431,6 +431,10 @@ func (v *View) setRune(x, y int, ch rune, fgColor, bgColor Attribute) error {
bgColor = v.BgColor
ch = v.Mask
} else if v.Highlight && ry == rcy {
fgColorComponent := fgColor & ^AttrAll
if fgColorComponent >= AttrIsValidColor && fgColorComponent < AttrIsValidColor+8 {
fgColor += 8
}
fgColor = fgColor | AttrBold
bgColor = bgColor | v.SelBgColor
}