Fix scan limit for --select-1 and --exit-0 options

This commit is contained in:
Junegunn Choi 2015-01-04 01:47:59 +09:00
parent baad26a0fd
commit 40d0a6347c

View File

@ -150,7 +150,7 @@ func (m *Matcher) scan(request MatchRequest, limit int) ([]*Item, bool) {
if cancelled.Get() { if cancelled.Get() {
return return
} }
countChan <- len(sliceMatches) countChan <- len(matches)
} }
if !empty && m.sort { if !empty && m.sort {
sort.Sort(ByRelevance(sliceMatches)) sort.Sort(ByRelevance(sliceMatches))