Sfoglia il codice sorgente

Make cursor gray if it is active

Johan Rong 1 mese fa
parent
commit
7bc78ee8e0
1 ha cambiato i file con 5 aggiunte e 1 eliminazioni
  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))				
+			}
 		}
 	}