To reproduce:
- Launch the following selection by
<M-d> mapping:
local select = function()
vim.ui.select({ "a", "b", "c" }, {
}, function()
-- normal mode here
end)
end
vim.keymap.set("i", "<M-d>", select)
- Close the selection by
<Esc>
The default selection preserves the insert mode.