Skip to content
Snippets Groups Projects
Unverified Commit d4b63381 authored by Junegunn Choi's avatar Junegunn Choi
Browse files

Lint

parent 8df7d962
No related branches found
No related tags found
No related merge requests found
......@@ -44,6 +44,7 @@ func buildEmptyRank(index int32) [5]int32 {
return [5]int32{0, 0, 0, 0, index}
}
// Index returns ordinal index of the Item
func (item *Item) Index() int32 {
return item.rank[4]
}
......
......@@ -200,7 +200,7 @@ func (m *Matcher) scan(request MatchRequest) (*Merger, bool) {
}
partialResults := make([][]*Item, numSlices)
for _, _ = range slices {
for _ = range slices {
partialResult := <-resultChan
partialResults[partialResult.index] = partialResult.matches
}
......
......@@ -2,7 +2,7 @@ package fzf
import "fmt"
// Merger with no data
// EmptyMerger is a Merger with no data
var EmptyMerger = NewMerger([][]*Item{}, false, false)
// Merger holds a set of locally sorted lists of items and provides the view of
......
......@@ -372,8 +372,8 @@ func (p *Pattern) iter(pfun func(bool, bool, util.Chars, []rune) algo.Result,
for _, part := range tokens {
prefixLength := int32(part.prefixLength)
if res := pfun(caseSensitive, forward, part.text, pattern); res.Start >= 0 {
var sidx int32 = res.Start + prefixLength
var eidx int32 = res.End + prefixLength
sidx := res.Start + prefixLength
eidx := res.End + prefixLength
return Offset{sidx, eidx, int32(part.trimLength)}, res.Bonus
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment