mirror of
https://github.com/zoriya/telescope.nvim.git
synced 2025-12-06 06:46:10 +00:00
fix(picker): nil check manager on toggle_selection (#3283)
Probably due to some async race condition, when typing fast, an error "attempt to index field 'manager' (a boolean value)" can be thrown if accidentally pressed <Tab> or <C-i> This is a temp fix for that.
This commit is contained in:
@@ -957,7 +957,7 @@ end
|
||||
--- Also updates the highlighting for the given entry
|
||||
---@param row number: the number of the chosen row
|
||||
function Picker:toggle_selection(row)
|
||||
local entry = self.manager:get_entry(self:get_index(row))
|
||||
local entry = self.manager and self.manager:get_entry(self:get_index(row))
|
||||
if entry == nil then
|
||||
return
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user