mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Fuzzy filter scores files more than 10 directories deep
All files more than 10 directories deep were accidentally being scored as 0.
This commit is contained in:
@@ -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 }
|
||||
|
||||
Reference in New Issue
Block a user