diff --git a/lua/telescope/_extensions/ui-select.lua b/lua/telescope/_extensions/ui-select.lua index 50e66fd..b7325d5 100644 --- a/lua/telescope/_extensions/ui-select.lua +++ b/lua/telescope/_extensions/ui-select.lua @@ -132,11 +132,17 @@ return require("telescope").register_extension { local selection = action_state.get_selected_entry() if selection == nil then utils.__warn_no_selection "ui-select" + on_choice(nil, nil) return end actions.close(prompt_bufnr) on_choice(selection.value.text, selection.value.idx) end) + actions.close:enhance { + post = function() + on_choice(nil, nil) + end, + } return true end, sorter = conf.generic_sorter(topts),