From 2fc7c18747250ebf8adf68d2057ec22af6976f29 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Wed, 7 Sep 2016 09:58:18 +0900 Subject: Revise ranking algorithm --- src/core.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/core.go') diff --git a/src/core.go b/src/core.go index 70f2da51..e707ad5f 100644 --- a/src/core.go +++ b/src/core.go @@ -143,8 +143,8 @@ func Run(opts *Options) { } patternBuilder := func(runes []rune) *Pattern { return BuildPattern( - opts.Fuzzy, opts.Extended, opts.Case, forward, opts.Filter == nil, - opts.Nth, opts.Delimiter, runes) + opts.Fuzzy, opts.FuzzyAlgo, opts.Extended, opts.Case, forward, + opts.Filter == nil, opts.Nth, opts.Delimiter, runes) } matcher := NewMatcher(patternBuilder, sort, opts.Tac, eventBox) @@ -158,11 +158,12 @@ func Run(opts *Options) { found := false if streamingFilter { + slab := util.MakeSlab(slab16Size, slab32Size) reader := Reader{ func(runes []byte) bool { item := chunkList.trans(runes, 0) if item != nil { - if result, _ := pattern.MatchItem(item); result != nil { + if result, _, _ := pattern.MatchItem(item, false, slab); result != nil { fmt.Println(item.text.ToString()) found = true } -- cgit v1.2.3