summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/terminal.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/terminal.go b/src/terminal.go
index 6f65f52e..8ffe9cef 100644
--- a/src/terminal.go
+++ b/src/terminal.go
@@ -3559,10 +3559,15 @@ Loop:
str, width := t.processTabs(trimmed, prefixWidth)
if width > prefixWidth {
prefixWidth = width
- if t.theme.Colored && ansi != nil && ansi.colored() {
+ colored := ansi != nil && ansi.colored()
+ if t.theme.Colored && colored {
fillRet = t.pwindow.CFill(ansi.fg, ansi.bg, ansi.attr, str)
} else {
- fillRet = t.pwindow.CFill(tui.ColPreview.Fg(), tui.ColPreview.Bg(), tui.AttrRegular, str)
+ attr := tui.AttrRegular
+ if colored {
+ attr = ansi.attr
+ }
+ fillRet = t.pwindow.CFill(tui.ColPreview.Fg(), tui.ColPreview.Bg(), attr, str)
}
}
return !isTrimmed &&