Skip to content

Commit b5fd7f7

Browse files
authored
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.
1 parent 0df05c9 commit b5fd7f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/telescope/pickers.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -957,7 +957,7 @@ end
957957
--- Also updates the highlighting for the given entry
958958
---@param row number: the number of the chosen row
959959
function Picker:toggle_selection(row)
960-
local entry = self.manager:get_entry(self:get_index(row))
960+
local entry = self.manager and self.manager:get_entry(self:get_index(row))
961961
if entry == nil then
962962
return
963963
end

0 commit comments

Comments
 (0)