fix(telescope.state.get_existing_prompts): it should only return keys that are numbers (#2684)

* fix(telescope.state.get_existing_prompts): it should only return keys that are numbers

* Table keys not table values should be numbers

* Rename get_existing_prompts to get_existing_prompt_bufnrs and make the impl more efficient

(cherry picked from commit 20a37e43bb)
This commit is contained in:
Sofronie Cristian
2023-09-05 16:11:12 +02:00
committed by Simon Hauser
parent 573a8b2b5f
commit 9a9ca52206
2 changed files with 11 additions and 3 deletions
+1 -1
View File
@@ -1223,7 +1223,7 @@ end
--- Close all open Telescope pickers
function Picker:close_existing_pickers()
for _, prompt_bufnr in ipairs(state.get_existing_prompts()) do
for _, prompt_bufnr in ipairs(state.get_existing_prompt_bufnrs()) do
pcall(actions.close, prompt_bufnr)
end
end