Describe the bug
when using vim.ui.select with the telescope backend, if you focus out of the telescope window (switch to any another window), telescope will close. However at that point the dressing vim.ui.select implementation is completely hung and no vim.ui.select will open again until neovim is restarted.
System information
OS: linux
Neovim version: 0.10.0
Is this related to a specific vim.ui.select backend? If so, which one? Telescope
Dressing config:
require('dressing').setup({
input = {
-- ESC won't close the modal, ability to use vim keys
insert_only = false,
get_config = function(opts)
if opts.kind == 'center_win' then
return {
relative = 'editor',
}
end
end
},
select = {
get_config = function(opts)
-- https://github.com/stevearc/dressing.nvim/issues/22#issuecomment-1067211863
-- for codeaction, we want null-ls to be last
-- https://github.com/jose-elias-alvarez/null-ls.nvim/issues/630
-- for eslint, it's offering me options like "disable eslint rule" which
-- are almost never what I want, and they appear before the more useful options
-- from the LSP
if opts.kind == 'codeaction' then
return {
telescope = {
-- sorter = require'telescope.sorters'.Sorter:new {
-- scoring_function = function(_, _, line)
-- local order = tonumber(string.match(line, "^[%d]+"))
-- if string.find(line, escape_pattern('null-ls')) then
-- return order+100
-- else
-- return order
-- end
-- end,
-- },
cache_picker = false,
-- copied from the telescope dropdown theme
sorting_strategy = "ascending",
layout_strategy = "center",
layout_config = {
preview_cutoff = 1, -- Preview should always show (unless previewer = false)
width = 80,
height = 15,
},
borderchars = {
prompt = { "─", "│", " ", "│", "╭", "╮", "│", "│" },
results = { "─", "│", "─", "│", "├", "┤", "╯", "╰" },
preview = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" },
},
}
}
end
end,
},
})
:1 wincmd w to switch to another window, or any other way to switch to another window than the telescope window. When switching, telescope (dressing) closes
Additional context
I'm pretty certain that the issue is that callback(nil, nil) should be called when telescope is closed, but telescope does not tell us when it gets closed due to focus loss (as opposed for instance of the user explicitly closing telescope). I tried to find a way to get notified somehow when telescope gets closed in such situations, but couldn't do it.
Describe the bug when using vim.ui.select with the telescope backend, if you focus out of the telescope window (switch to any another window), telescope will close. However at that point the dressing vim.ui.select implementation is completely hung and no vim.ui.select will open again until neovim is restarted.
System information
vim.ui.select
backend? If so, which one? TelescopeTo Reproduce Steps to reproduce the behavior:
:1 wincmd w
to switch to another window, or any other way to switch to another window than the telescope window. When switching, telescope (dressing) closesFrom now on, vim.ui.select won't open again.
Additional context I'm pretty certain that the issue is that
callback(nil, nil)
should be called when telescope is closed, but telescope does not tell us when it gets closed due to focus loss (as opposed for instance of the user explicitly closing telescope). I tried to find a way to get notified somehow when telescope gets closed in such situations, but couldn't do it.