Add mouse tests; tidy TUI idioms

This commit is contained in:
Andy Dixon
2026-10-02 08:36:23 +01:00
parent 71556b76de
commit 8559616b65
7 changed files with 85 additions and 36 deletions
+1 -8
View File
@@ -241,17 +241,10 @@ func (m *Model) paintSearch(cv *Canvas, r treemap.Rect) {
if s.ed.cur < len(text) {
under = textutil.Sanitize(string(text[s.ed.cur]))
}
cv.Text(cx, r.Y, under, 2, Style{FG: t.PanelBg, BG: t.Fg, Attr: Reverse * Attr(boolInt(t.Mono))})
cv.Text(cx, r.Y, under, 2, Style{FG: t.PanelBg, BG: t.Fg, Attr: m.monoRev()})
cv.TextRight(r.X, r.Y, r.W-1, textutil.Truncate(status, sw), statusSt)
}
func boolInt(b bool) int {
if b {
return 1
}
return 0
}
func (m *Model) paintFilterSummary(cv *Canvas, r treemap.Rect) {
t := m.theme
s := &m.search