summaryrefslogtreecommitdiff
path: root/lua/telescope/pickers.lua
diff options
context:
space:
mode:
authorTJ DeVries <devries.timothyj@gmail.com>2020-09-17 21:51:14 -0400
committerTJ DeVries <devries.timothyj@gmail.com>2020-09-18 00:11:22 -0400
commitf3fc1ca8c1d4cdc941ee25a8ca8fbd4895270f82 (patch)
tree1ff10086959325f0193908666fa3abcc544ed771 /lua/telescope/pickers.lua
parent93369e1488d66a699a8dadfdc9eba0ee814fb3b7 (diff)
fix: Make tests pass again
Diffstat (limited to 'lua/telescope/pickers.lua')
-rw-r--r--lua/telescope/pickers.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/lua/telescope/pickers.lua b/lua/telescope/pickers.lua
index f9427c3..cc9eb14 100644
--- a/lua/telescope/pickers.lua
+++ b/lua/telescope/pickers.lua
@@ -671,8 +671,6 @@ pickers.entry_manager = function(max_results, set_entry)
return setmetatable({
add_entry = function(self, score, entry)
- assert(type(entry) == "table", "entry must be a table by the time it reaches here")
-
score = score or 0
for index, item in ipairs(entry_state) do
@@ -727,6 +725,10 @@ pickers.entry_manager = function(max_results, set_entry)
return (entry_state[index] or {}).entry
end,
+ get_score = function(_, index)
+ return (entry_state[index] or {}).score
+ end,
+
find_entry = function(_, entry)
if entry == nil then
return nil