summaryrefslogtreecommitdiffstats
path: root/src/item.go
diff options
context:
space:
mode:
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: