Skip to content

Commit 6a1a6d7

Browse files
committed
wow
1 parent c45e4c3 commit 6a1a6d7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lua/dired/init.lua

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,6 +1036,7 @@ Browser.State = {
10361036
end
10371037

10381038
vim.schedule(function()
1039+
local filters = {}
10391040
if #results > 0 then
10401041
local names = Iter(results):map(function(entry)
10411042
return entry.name
@@ -1045,16 +1046,17 @@ Browser.State = {
10451046
for k, v in ipairs(res[1]) do
10461047
if v == entry.name then
10471048
entry.match_pos = res[2][k]
1048-
entry.score = res[3][k]
1049+
entry.score = res[3][k] or 0
1050+
table.insert(filters, entry)
10491051
end
10501052
end
10511053
end
1052-
table.sort(results, function(a, b)
1054+
table.sort(filters, function(a, b)
10531055
return a.score > b.score
10541056
end)
10551057
state.search_results = results
10561058
end
1057-
update_display(state, results, false)
1059+
update_display(state, filters, false)
10581060
end)
10591061
end)
10601062
end

0 commit comments

Comments
 (0)