summaryrefslogtreecommitdiff
path: root/lua/telescope/entry_manager.lua
diff options
context:
space:
mode:
authorTJ DeVries <devries.timothyj@gmail.com>2021-04-08 10:35:44 -0400
committerGitHub <noreply@github.com>2021-04-08 10:35:44 -0400
commit64e59060b1750d0c86761693b6847c3db07afcd2 (patch)
tree13e8c0117cdff926e7bbf107f5496c733329cfb7 /lua/telescope/entry_manager.lua
parente5fbe6fe60149af8fdeef0d07cba06c029258ba0 (diff)
feat: asyncify pickers - except for live_grep (#709)
* something kind of works already * yayayayayayayayayayayayayayayayayayayayayayayayayayayayayayayayaya * use async for everything besides live jobs * fix: fixup autocmds previewer * fix: lints for prime * temp: Add example of how we can think about async sorters * feat: Allow picker to decide when to cancel * fix: simplify scoring logic and tests * fixup: name * fix: Move back towards more backwards compat methods * fixup: Remove results from opts * fixup: remove trailing quote * fixup: Attempt to clean up some more async items. Next is status * wip: Add todo for when bfredl implements extmarks over the EOL * wip * fixup: got em * fixup: cleaning * fixup: docs
Diffstat (limited to 'lua/telescope/entry_manager.lua')
-rw-r--r--lua/telescope/entry_manager.lua10
1 files changed, 1 insertions, 9 deletions
diff --git a/lua/telescope/entry_manager.lua b/lua/telescope/entry_manager.lua
index c7350cb..f32d29f 100644
--- a/lua/telescope/entry_manager.lua
+++ b/lua/telescope/entry_manager.lua
@@ -26,7 +26,7 @@ if past loop of must have scores,
local EntryManager = {}
EntryManager.__index = EntryManager
-function EntryManager:new(max_results, set_entry, info, id)
+function EntryManager:new(max_results, set_entry, info)
log.trace("Creating entry_manager...")
info = info or {}
@@ -40,7 +40,6 @@ function EntryManager:new(max_results, set_entry, info, id)
set_entry = set_entry or function() end
return setmetatable({
- id = id,
linked_states = LinkedList:new { track_at = max_results },
info = info,
max_results = max_results,
@@ -128,13 +127,6 @@ function EntryManager:_append_container(picker, new_container, should_update)
end
function EntryManager:add_entry(picker, score, entry)
- if picker and picker.id then
- if picker.request_number ~= self.id then
- error("ADDING ENTRY TOO LATE!")
- return
- end
- end
-
score = score or 0
local max_res = self.max_results