diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2015-11-10 01:50:41 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2015-11-10 01:54:37 +0900 |
| commit | 31278bcc6895089c97fc5d038cd1dd99053c3764 (patch) | |
| tree | 5087edff8c881fa1b0c320b84d5952b7cc98d010 /src/item.go | |
| parent | e7e86b68f4e6a27cc071cf48530ad6ae2c0c37bb (diff) | |
| download | fzf-31278bcc6895089c97fc5d038cd1dd99053c3764.tar.gz | |
Fix compatibility issues with OR operator and inverse terms
Diffstat (limited to 'src/item.go')
| -rw-r--r-- | src/item.go | 3 |
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: |
