summaryrefslogtreecommitdiff
path: root/src/item.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2015-11-10 01:50:41 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2015-11-10 01:54:37 +0900
commit31278bcc6895089c97fc5d038cd1dd99053c3764 (patch)
tree5087edff8c881fa1b0c320b84d5952b7cc98d010 /src/item.go
parente7e86b68f4e6a27cc071cf48530ad6ae2c0c37bb (diff)
downloadfzf-31278bcc6895089c97fc5d038cd1dd99053c3764.tar.gz
Fix compatibility issues with OR operator and inverse terms
Diffstat (limited to 'src/item.go')
-rw-r--r--src/item.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/item.go b/src/item.go
index f2f105ac..5ce25c71 100644
--- a/src/item.go
+++ b/src/item.go
@@ -63,6 +63,9 @@ func (item *Item) Rank(cache bool) Rank {
matchlen += end - begin
}
}
+ if matchlen == 0 {
+ matchlen = math.MaxUint16
+ }
var tiebreak uint16
switch rankTiebreak {
case byLength: