Kaynağa Gözat

Make cursor gray if it is active

Johan Rong 1 ay önce
ebeveyn
işleme
7bc78ee8e0
1 değiştirilmiş dosya ile 5 ekleme ve 1 silme
  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))				
+			}
 		}
 	}