diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2017-07-20 02:44:30 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2017-07-20 02:44:30 +0900 |
commit | c9f16b6430f3b9c9d12ee078e2218e8467c13340 (patch) | |
tree | b0d7e33da2d605696d98da98e1691bf8d89437de /src/pattern_test.go | |
parent | bc9d2abdb67639e06f7002b278341fb498b79456 (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_test.go')
-rw-r--r-- | src/pattern_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pattern_test.go b/src/pattern_test.go index 31a127e3..85c174c9 100644 --- a/src/pattern_test.go +++ b/src/pattern_test.go @@ -133,7 +133,7 @@ func TestCaseSensitivity(t *testing.T) { func TestOrigTextAndTransformed(t *testing.T) { pattern := BuildPattern(true, algo.FuzzyMatchV2, true, CaseSmart, false, true, true, []Range{}, Delimiter{}, []rune("jg")) - tokens := Tokenize(util.RunesToChars([]rune("junegunn")), Delimiter{}) + tokens := Tokenize("junegunn", Delimiter{}) trans := Transform(tokens, []Range{Range{1, 1}}) origBytes := []byte("junegunn.choi") |