mirror of
https://github.com/kristoferssolo/telescope-frecency.nvim.git
synced 2025-10-21 20:10:38 +00:00
sort results by score value
This commit is contained in:
parent
bcec7dd4b8
commit
a78efd4afa
@ -70,6 +70,13 @@ local function get_file_scores()
|
|||||||
score = calculate_file_score(file_entry.count, filter_timestamps(timestamp_ages, file_entry.id))
|
score = calculate_file_score(file_entry.count, filter_timestamps(timestamp_ages, file_entry.id))
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- sort the table
|
||||||
|
local function compare(a, b)
|
||||||
|
return a.score > b.score
|
||||||
|
end
|
||||||
|
table.sort(scores, compare)
|
||||||
|
|
||||||
return scores
|
return scores
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user