diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2017-03-02 12:49:51 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2017-03-02 12:49:51 +0900 |
commit | 972fb1a29ddd484c97342cf0e7399bd904ded58d (patch) | |
tree | 186776dd7b953624f43f9e9dbf8f1216fa7d2d35 | |
parent | 3a6af27586c65bb9243c5af7c43a40619503db52 (diff) |
Suppress ANSI colors in preview window if --no-color is set
-rw-r--r-- | src/terminal.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/terminal.go b/src/terminal.go index 29f2c9d0..c7c21c4f 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -958,7 +958,7 @@ func (t *Terminal) printPreview() { trimmed, _ = t.trimRight(trimmed, maxWidth-t.pwindow.X()) } 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) } else { fillRet = t.pwindow.Fill(str) |