TUI: fix broken sort-marker — plain ▼ text (ANSI in truncated titles corrupted the header)

This commit is contained in:
2026-08-06 15:43:44 +10:00
parent e22ddb43d4
commit 7aa09842d2

View File

@@ -91,8 +91,10 @@ func buildColumns(sortMode int) []table.Column {
{Title: "Task", Width: 20},
}
if idx := sortColumn(sortMode); idx >= 0 {
marker := lipgloss.NewStyle().Foreground(lipgloss.Color("#00d4ff")).Bold(true).Render("▼")
cols[idx].Title = marker + " " + cols[idx].Title
// Plain text marker — NO ANSI styling inside the title: column titles get
// runewidth-truncated, which mangles escape sequences (eaten text, broken
// headers). The bare ▼ is the highlight.
cols[idx].Title = "▼ " + cols[idx].Title
}
return cols
}