mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-11-11 16:15:46 +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}
|
return [5]int32{0, 0, 0, 0, index}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Index returns ordinal index of the Item
|
||||||
func (item *Item) Index() int32 {
|
func (item *Item) Index() int32 {
|
||||||
return item.rank[4]
|
return item.rank[4]
|
||||||
}
|
}
|
||||||
|
@ -200,7 +200,7 @@ func (m *Matcher) scan(request MatchRequest) (*Merger, bool) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
partialResults := make([][]*Item, numSlices)
|
partialResults := make([][]*Item, numSlices)
|
||||||
for _, _ = range slices {
|
for _ = range slices {
|
||||||
partialResult := <-resultChan
|
partialResult := <-resultChan
|
||||||
partialResults[partialResult.index] = partialResult.matches
|
partialResults[partialResult.index] = partialResult.matches
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ package fzf
|
|||||||
|
|
||||||
import "fmt"
|
import "fmt"
|
||||||
|
|
||||||
// Merger with no data
|
// EmptyMerger is a Merger with no data
|
||||||
var EmptyMerger = NewMerger([][]*Item{}, false, false)
|
var EmptyMerger = NewMerger([][]*Item{}, false, false)
|
||||||
|
|
||||||
// Merger holds a set of locally sorted lists of items and provides the view of
|
// 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 {
|
for _, part := range tokens {
|
||||||
prefixLength := int32(part.prefixLength)
|
prefixLength := int32(part.prefixLength)
|
||||||
if res := pfun(caseSensitive, forward, part.text, pattern); res.Start >= 0 {
|
if res := pfun(caseSensitive, forward, part.text, pattern); res.Start >= 0 {
|
||||||
var sidx int32 = res.Start + prefixLength
|
sidx := res.Start + prefixLength
|
||||||
var eidx int32 = res.End + prefixLength
|
eidx := res.End + prefixLength
|
||||||
return Offset{sidx, eidx, int32(part.trimLength)}, res.Bonus
|
return Offset{sidx, eidx, int32(part.trimLength)}, res.Bonus
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user