Skip to content

Commit

Permalink
Merge pull request #19 from mbbill/master
Browse files Browse the repository at this point in the history
Filter away unmatched items
  • Loading branch information
FelikZ committed Apr 26, 2015
2 parents dc03f6b + f26fcde commit 2c4b3dd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion autoload/pymatcher.py
Expand Up @@ -76,7 +76,10 @@ def path_score(line):
else:
res = [(path_score(line), line) for line in items]

rez.extend([line for score, line in heapq.nlargest(limit, res)])
#rez.extend([line for score, line in heapq.nlargest(limit, res)])
for score, line in heapq.nlargest(limit, res):
if score != 0:
rez.extend([line])

# Use double quoted vim strings and escape \
vimrez = ['"' + line.replace('\\', '\\\\').replace('"', '\\"') + '"' for line in rez]
Expand Down

0 comments on commit 2c4b3dd

Please sign in to comment.