TUI: fix broken sort-marker — plain ▼ text (ANSI in truncated titles corrupted the header)
This commit is contained in:
6
main.go
6
main.go
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user