Remove unnecessary ANSI code injection

This commit is contained in:
Junegunn Choi 2019-03-07 02:01:34 +09:00
parent 1a6defdbcc
commit e00e7e1e56
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627
1 changed files with 1 additions and 1 deletions

View File

@ -102,7 +102,7 @@ func Run(opts *Options, revision string) {
} else {
chunkList = NewChunkList(func(item *Item, data []byte) bool {
tokens := Tokenize(string(data), opts.Delimiter)
if opts.Ansi && len(tokens) > 1 {
if opts.Ansi && opts.Theme != nil && len(tokens) > 1 {
var ansiState *ansiState
if prevLineAnsiState != nil {
ansiStateDup := *prevLineAnsiState