Skip to content

Commit

Permalink
fix: call on_choice on actions.close
Browse files Browse the repository at this point in the history
close #32
  • Loading branch information
Conni2461 committed Nov 24, 2023
1 parent c707661 commit 7eb3904
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lua/telescope/_extensions/ui-select.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 7eb3904

Please sign in to comment.