m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-17 15:53:39 -05:00

Do not process ANSI codes in --preview output at once

Close #598
This commit is contained in:
Junegunn Choi
2016-06-14 21:52:47 +09:00
parent c39c039e15
commit 24e1fabf2e
5 changed files with 19 additions and 24 deletions

View File

@@ -128,7 +128,7 @@ func (item *Item) AsString(stripAnsi bool) string {
func (item *Item) StringPtr(stripAnsi bool) *string {
if item.origText != nil {
if stripAnsi {
trimmed, _, _ := extractColor(string(*item.origText), nil)
trimmed, _, _ := extractColor(string(*item.origText), nil, nil)
return &trimmed
}
orig := string(*item.origText)