mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-12-26 20:31:22 +00:00
Fix #329 - Trim ANSI codes from output when --ansi & --with-nth are set
This commit is contained in:
parent
80ed02e72e
commit
5a72dc6922
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user