summaryrefslogtreecommitdiffstats
path: root/src/pattern.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2017-07-20 02:44:30 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2017-07-20 02:44:30 +0900
commitc9f16b6430f3b9c9d12ee078e2218e8467c13340 (patch)
treeb0d7e33da2d605696d98da98e1691bf8d89437de /src/pattern.go
parentbc9d2abdb67639e06f7002b278341fb498b79456 (diff)
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.
Diffstat (limited to 'src/pattern.go')
-rw-r--r--src/pattern.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pattern.go b/src/pattern.go
index 97ee8fd6..64296d71 100644
--- a/src/pattern.go
+++ b/src/pattern.go
@@ -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