From 6c9c7b6d92871b7d3e8d791e306e2ec57d45f742 Mon Sep 17 00:00:00 2001 From: probablycorey Date: Mon, 12 Aug 2013 09:43:43 -0700 Subject: [PATCH] Fuzzy filter scores files more than 10 directories deep All files more than 10 directories deep were accidentally being scored as 0. --- src/stdlib/fuzzy-filter.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stdlib/fuzzy-filter.coffee b/src/stdlib/fuzzy-filter.coffee index c081d3cc1..6cd16e071 100644 --- a/src/stdlib/fuzzy-filter.coffee +++ b/src/stdlib/fuzzy-filter.coffee @@ -12,7 +12,7 @@ module.exports = (candidates, query, options={}) -> score += stringScore(path.basename(string), query) # Shallow files are scored higher - depth = Math.min(1, 10 - string.split('/').length - 1) + depth = Math.max(1, 10 - string.split('/').length - 1) score *= depth * 0.01 { candidate, score }