Renamed commandbar scoring function to be more generic (#31).

This commit is contained in:
Paul Kulchenko
2014-12-06 23:02:43 -08:00
parent aacb686b55
commit e0cbd25254
2 changed files with 2 additions and 2 deletions

View File

@@ -282,7 +282,7 @@ local function score(p, v)
return cache[key]
end
function CommandBarScoreFiles(t, pattern, limit)
function CommandBarScoreItems(t, pattern, limit)
local r, plen = {}, #pattern
local maxp = 0
local num = 0

View File

@@ -217,7 +217,7 @@ local function navigateTo(default)
end
end
local topscore
for _, item in ipairs(CommandBarScoreFiles(projectFiles, text, 100)) do
for _, item in ipairs(CommandBarScoreItems(projectFiles, text, 100)) do
local file, score = unpack(item)
topscore = topscore or score
if score > topscore / 4 and score > 1 then