From c1b14ea2afab51214ddb1ff44265a4557df91b2a Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Sat, 26 Sep 2026 17:42:43 +0200 Subject: [PATCH] Stop brightening the text of the selected line gocui draws the palette colors 0 to 7 on the selected line in their bright variants. This was meant for the blue highlight on a dark background, but in most dark palettes the bright variants are so close to the normal ones that it's barely visible. Elsewhere it makes the text harder to read. In many palettes, the bright variants are lighter, and they don't work on the light highlight of a light background. Solarized maps most of its bright colors to its grays, so colored text on the selected line turns gray. Draw the text of the selected line in the same colors as on the other lines. Co-Authored-By: Claude Opus 5.5 (1M context) --- pkg/gocui/view.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pkg/gocui/view.go b/pkg/gocui/view.go index 0a06d1981..d8202ddfc 100644 --- a/pkg/gocui/view.go +++ b/pkg/gocui/view.go @@ -722,11 +722,6 @@ func (v *View) setCharacter(x, y int, ch string, fgColor, bgColor Attribute, isW } if y >= rangeSelectStart && y <= rangeSelectEnd { - // this ensures we use the bright variant of a colour upon highlight - fgColorComponent := fgColor & ^AttrAll - if fgColorComponent >= AttrIsValidColor && fgColorComponent < AttrIsValidColor+8 { - fgColor += 8 - } fgColor = fgColor | AttrBold if v.HighlightInactive || !isWindowFocused { bgColor = (bgColor & AttrStyleBits) | v.InactiveViewSelBgColor