Преглед изворни кода

Make cursor gray if it is active

Johan Rong пре 1 месец
родитељ
комит
7bc78ee8e0
1 измењених фајлова са 5 додато и 1 уклоњено
  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))				
+			}
 		}
 	}