mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-12-23 19:39:07 +00:00
Lint
This commit is contained in:
parent
8df7d962e6
commit
d4b6338102
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user