mirror of
https://github.com/junegunn/fzf
synced 2024-11-16 12:12:48 +00:00
Suppress ANSI colors in preview window if --no-color is set
This commit is contained in:
parent
3a6af27586
commit
972fb1a29d
@ -958,7 +958,7 @@ func (t *Terminal) printPreview() {
|
|||||||
trimmed, _ = t.trimRight(trimmed, maxWidth-t.pwindow.X())
|
trimmed, _ = t.trimRight(trimmed, maxWidth-t.pwindow.X())
|
||||||
}
|
}
|
||||||
str, _ = t.processTabs(trimmed, 0)
|
str, _ = t.processTabs(trimmed, 0)
|
||||||
if ansi != nil && ansi.colored() {
|
if t.theme != nil && ansi != nil && ansi.colored() {
|
||||||
fillRet = t.pwindow.CFill(ansi.fg, ansi.bg, ansi.attr, str)
|
fillRet = t.pwindow.CFill(ansi.fg, ansi.bg, ansi.attr, str)
|
||||||
} else {
|
} else {
|
||||||
fillRet = t.pwindow.Fill(str)
|
fillRet = t.pwindow.Fill(str)
|
||||||
|
Loading…
Reference in New Issue
Block a user