mirror of
https://github.com/junegunn/fzf.git
synced 2025-08-02 13:12:00 -07:00
Avoid unconditionally storsing input as runes
When --with-nth is used, fzf used to preprocess each line and store the result as rune array, which was wasteful if the line only contains ascii characters.
This commit is contained in:
@@ -362,7 +362,7 @@ func (p *Pattern) prepareInput(item *Item) []Token {
|
||||
return *item.transformed
|
||||
}
|
||||
|
||||
tokens := Tokenize(item.text, p.delimiter)
|
||||
tokens := Tokenize(item.text.ToString(), p.delimiter)
|
||||
ret := Transform(tokens, p.nth)
|
||||
item.transformed = &ret
|
||||
return ret
|
||||
|
Reference in New Issue
Block a user