Skip to content
Myr

Fix #329 - Trim ANSI codes from output when --ansi & --with-nth are set

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent 80ed02e · Browse files · 1 file+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−3 removed

  • other:+3 added−3 removed

1 file+3 added−3 removed

modified:src/item.go+3 added-3 removed
98 unmodified lines
99}100101// StringPtr returns the pointer to the original string102func (item *Item) StringPtr() *string {103 runes := item.text103 if item.origText != nil {105 runes = *item.origText104 trimmed, _, _ := extractColor(string(*item.origText), nil)105 return &trimmed106 }107 str := string(runes)107 str := string(item.text)108 return &str109}110111func (item *Item) colorOffsets(color int, bold bool, current bool) []colorOffset {
152 unmodified lines