Explorar o código

Make cursor gray if it is active

Johan Rong hai 1 mes
pai
achega
7bc78ee8e0
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      internal/editor/model.go

+ 5 - 1
internal/editor/model.go

@@ -72,7 +72,11 @@ func (m Model) Render() {
 			if line + 1 > maxHeight { continue }
 			if col + 1 > bufWidth { continue }
 
-			m.Screen.SetContent(bufWidth * i + col, line, ' ', nil, m.Style.Reverse(true))
+			if i == m.BM.CurrentIdx && m.Mode != ModePalette {
+				m.Screen.SetContent(bufWidth * i + col, line, ' ', nil, m.Style.Reverse(true))
+			} else {
+				m.Screen.SetContent(bufWidth * i + col, line, ' ', nil, m.Style.Reverse(true).Foreground(tcell.ColorGray))				
+			}
 		}
 	}