mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-16 23:33:39 -05:00
Use unicode.IsSpace to cover more whitespace characters
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user