mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-17 15:53:39 -05:00
Fix #329 - Trim ANSI codes from output when --ansi & --with-nth are set
This commit is contained in:
@@ -100,11 +100,11 @@ func (item *Item) AsString() string {
|
||||
|
||||
// StringPtr returns the pointer to the original string
|
||||
func (item *Item) StringPtr() *string {
|
||||
runes := item.text
|
||||
if item.origText != nil {
|
||||
runes = *item.origText
|
||||
trimmed, _, _ := extractColor(string(*item.origText), nil)
|
||||
return &trimmed
|
||||
}
|
||||
str := string(runes)
|
||||
str := string(item.text)
|
||||
return &str
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user