Explorar el Código

Make cursor gray if it is active

Johan Rong hace 1 mes
padre
commit
7bc78ee8e0
Se han modificado 1 ficheros con 5 adiciones y 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))				
+			}
 		}
 	}