summaryrefslogtreecommitdiff
path: root/src/tokenizer.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2024-05-07 16:58:17 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2024-05-07 16:58:17 +0900
commit4bedd33c593ab0cb750e17c42750048904fdf7fb (patch)
tree10ef749a51b1b947f5bb34eb154c5f992a50edbb /src/tokenizer.go
parentc5fb0c43f9222e72ff00290162b68e34a8f0d5d7 (diff)
downloadfzf-4bedd33c593ab0cb750e17c42750048904fdf7fb.tar.gz
Refactor the code to remove global variables
Diffstat (limited to 'src/tokenizer.go')
-rw-r--r--src/tokenizer.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tokenizer.go b/src/tokenizer.go
index defe8cce..6b2ef72b 100644
--- a/src/tokenizer.go
+++ b/src/tokenizer.go
@@ -91,7 +91,7 @@ func withPrefixLengths(tokens []string, begin int) []Token {
prefixLength := begin
for idx := range tokens {
- chars := util.ToChars(sbytes(tokens[idx]))
+ chars := util.ToChars(stringBytes(tokens[idx]))
ret[idx] = Token{&chars, int32(prefixLength)}
prefixLength += chars.Length()
}
@@ -187,7 +187,7 @@ func Transform(tokens []Token, withNth []Range) []Token {
if r.begin == r.end {
idx := r.begin
if idx == rangeEllipsis {
- chars := util.ToChars(sbytes(joinTokens(tokens)))
+ chars := util.ToChars(stringBytes(joinTokens(tokens)))
parts = append(parts, &chars)
} else {
if idx < 0 {