Skip to content

Commit

Permalink
Escape the TUI log lines in ANSI color mode
Browse files Browse the repository at this point in the history
  • Loading branch information
enobayram authored and F1bonacc1 committed Jul 19, 2023
1 parent 3032228 commit f422f37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tui/log-viewer.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (l *LogView) WriteString(line string) (n int, err error) {
l.mx.Lock()
defer l.mx.Unlock()
if l.useAnsi {
return l.buffer.WriteString(line + "\n")
return l.buffer.WriteString(tview.Escape(line) + "\n")
}
if strings.Contains(strings.ToLower(line), "error") {
return fmt.Fprintf(l.buffer, "[deeppink]%s[-:-:-]\n", tview.Escape(line))
Expand Down

0 comments on commit f422f37

Please sign in to comment.