Handle untimestamped text view lines

This commit is contained in:
Brandon McGinty (chatgpt)
2026-08-09 14:23:27 -04:00
committed by Brandon McGinty
parent 214ccb8787
commit 0e9e495a8f
+5 -2
View File
@@ -84,8 +84,11 @@ func (t *Textview) updateParsedLines() {
parsed := make([]string, 0, len(t.Lines))
for _, line := range t.Lines {
var l = line
if t.showTimestamps == false {
l = strings.TrimSpace(strings.Split(line, "]")[1])
if !t.showTimestamps {
// Server and local messages need not have a timestamp prefix.
if _, text, ok := strings.Cut(line, "]"); ok {
l = strings.TrimSpace(text)
}
}
current := ""
chars := 0