diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2016-09-29 22:40:22 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2016-09-29 22:40:22 +0900 |
| commit | 04492bab10aeb0d081eeb8806792ccb77a8c5cb6 (patch) | |
| tree | ed1543b0d1b85ac53c26e1a0ecc887328e5ea734 /src/result.go | |
| parent | 8b0d0342d43ed410e8542655932b60c9c0d817c6 (diff) | |
| download | fzf-04492bab10aeb0d081eeb8806792ccb77a8c5cb6.tar.gz | |
Use unicode.IsSpace to cover more whitespace characters
Diffstat (limited to 'src/result.go')
| -rw-r--r-- | src/result.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/result.go b/src/result.go index 9152f671..bc1deb47 100644 --- a/src/result.go +++ b/src/result.go @@ -3,6 +3,7 @@ package fzf import ( "math" "sort" + "unicode" "github.com/junegunn/fzf/src/curses" "github.com/junegunn/fzf/src/util" @@ -62,7 +63,7 @@ func buildResult(item *Item, offsets []Offset, score int, trimLen int) *Result { for idx := 0; idx < numChars; idx++ { r := item.text.Get(idx) whitePrefixLen = idx - if idx == minBegin || r != ' ' && r != '\t' { + if idx == minBegin || !unicode.IsSpace(r) { break } } |
