Handle untimestamped text view lines
This commit is contained in:
committed by
Brandon McGinty
parent
214ccb8787
commit
0e9e495a8f
+5
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user