Skip to content

Commit d732f88

Browse files
committed
fix(uicolortheme): adjust cursor line color calculation
- Replace 'cursorline' with 'cursorcolumn' for color retrieval - Remove unused color manipulation and debugging code - Simplify cursor line color setting using Foreground method
1 parent 5fdd37f commit d732f88

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

pkg/ui/uicolortheme.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,14 @@ func HexToRGB(hexString string) (int, int, int, error) {
117117
func (mgr *symbol_colortheme) set_currsor_line() {
118118
if ret := mgr.get_color("cursorline"); ret != nil {
119119
_, bg, _ := ret.Decompose()
120-
ss := bg.Hex()
121-
debug.DebugLogf("color", "#%x %s", ss, mgr.name)
122-
x := lightenColor(IntToRGB(bg), 0.2)
123-
v := ColorToCellColor(x)
124-
s := ret.Background(v)
125-
_, bg, _ = s.Decompose()
120+
// ss := bg.Hex()
121+
// debug.DebugLogf("color", "#%x %s", ss, mgr.name)
122+
// x := lightenColor(IntToRGB(bg), 0.2)
123+
// v := ColorToCellColor(x)
124+
// s := ret.Background(v)
125+
// _, bg, _ = ret.Decompose()
126126
debug.DebugLogf("color", "#%x %s", bg.Hex(), mgr.name)
127-
mgr.colorscheme["cursor-line"] = s
127+
mgr.colorscheme["cursor-line"] = ret.Foreground(bg)
128128
}
129129
if bg := global_config.Color.Cursorline; bg != nil {
130130
if r, g, b, err := hexToRGB(*bg); err == nil {

0 commit comments

Comments
 (0)