Skip to content
Myr

Lint

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent 8df7d96 · Browse files · 4 files+5 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

4 files+5 added−4 removed

  • other:+5 added−4 removed

4 files+5 added−4 removed

modified:src/item.go+1 added
42 unmodified lines
43func buildEmptyRank(index int32) [5]int32 {44 return [5]int32{0, 0, 0, 0, index}45}4647// Index returns ordinal index of the Item48func (item *Item) Index() int32 {49 return item.rank[4]50}51
244 unmodified lines
modified:src/matcher.go+1 added-1 removed
198 unmodified lines
199 }200 }201202 partialResults := make([][]*Item, numSlices)203 for _, _ = range slices {203 for _ = range slices {204 partialResult := <-resultChan205 partialResults[partialResult.index] = partialResult.matches206 }207 return NewMerger(partialResults, m.sort, m.tac), false
14 unmodified lines
modified:src/merger.go+1 added-1 removed
1package fzf23import "fmt"45// Merger with no data5// EmptyMerger is a Merger with no data6var EmptyMerger = NewMerger([][]*Item{}, false, false)78// Merger holds a set of locally sorted lists of items and provides the view of9// a single, globally-sorted list
109 unmodified lines
modified:src/pattern.go+2 added-2 removed
370 unmodified lines
371 tokens []Token, caseSensitive bool, forward bool, pattern []rune) (Offset, int32) {372 for _, part := range tokens {373 prefixLength := int32(part.prefixLength)374 if res := pfun(caseSensitive, forward, part.text, pattern); res.Start >= 0 {375 var sidx int32 = res.Start + prefixLength376 var eidx int32 = res.End + prefixLength375 sidx := res.Start + prefixLength376 eidx := res.End + prefixLength377 return Offset{sidx, eidx, int32(part.trimLength)}, res.Bonus378 }379 }380 // TODO: math.MaxUint16
2 unmodified lines