Closed przepompownia closed 8 months ago
good catch, https://github.com/nvim-telescope/telescope-ui-select.nvim/pull/34 should fix your issue. can you confirm? after that i'll merge
With #34 on_choice
is called with nil
as expected, thanks!
Independently, please notice that to cancel we need to exit Insert mode first and then close the dialog.
Independently, please notice that to cancel we need to exit Insert mode first and then close the dialog.
i dont know what that means?
In short, we need to press double Esc
to cancel.
thats a telescope configure thing, isnt it. like the default telescope esc action does not close, it switches modes. you can override this,s ee: https://github.com/nvim-telescope/telescope.nvim/wiki/Configuration-Recipes#mapping-esc-to-quit-in-insert-mode
this is also documented here: https://github.com/nvim-telescope/telescope.nvim?tab=readme-ov-file#default-mappings
does this answer your question?
Ah, ok. I have this mapping for years but my observation came from the minimal repro. I'm sorry for the unnecessary confusion.
Minimal
init.lua
:After close by
<Esc>
nothing happens in opposite to expected callingon_choice
callback with (nil
,nil
) like in https://github.com/neovim/neovim/blob/488038580934f301c1528a14548ec0cabd16c2cd/runtime/lua/vim/ui.lua#L52.