fix: #236
This commit is contained in:
@@ -197,7 +197,13 @@ function Picker:get_reset_row()
|
||||
end
|
||||
end
|
||||
|
||||
function Picker:is_done()
|
||||
if not self.manager then return true end
|
||||
end
|
||||
|
||||
function Picker:clear_extra_rows(results_bufnr)
|
||||
if self:is_done() then return end
|
||||
|
||||
if not vim.api.nvim_buf_is_valid(results_bufnr) then
|
||||
log.debug("Invalid results_bufnr for clearing:", results_bufnr)
|
||||
return
|
||||
@@ -412,6 +418,8 @@ function Picker:find()
|
||||
-- self.manager = EntryManager:new(self.max_results, self.entry_adder, self.stats)
|
||||
|
||||
local process_result = function(entry)
|
||||
if self:is_done() then return end
|
||||
|
||||
self:_increment("processed")
|
||||
|
||||
if not entry then
|
||||
@@ -455,6 +463,8 @@ function Picker:find()
|
||||
end
|
||||
|
||||
local process_complete = function()
|
||||
if self:is_done() then return end
|
||||
|
||||
-- TODO: We should either: always leave one result or make sure we actually clean up the results when nothing matches
|
||||
if selection_strategy == 'row' then
|
||||
self:set_selection(self:get_selection_row())
|
||||
|
||||
Reference in New Issue
Block a user