mirror of
https://github.com/zoriya/telescope.nvim.git
synced 2026-06-04 11:44:21 +00:00
fix: correctly create User autocmd in action.which_key (#2736)
(cherry picked from commit 550055e640)
This commit is contained in:
committed by
Simon Hauser
parent
296668f632
commit
7011eaae0a
@@ -1270,7 +1270,8 @@ actions.which_key = function(prompt_bufnr, opts)
|
||||
-- only set up autocommand after showing preview completed
|
||||
if opts.close_with_action then
|
||||
vim.schedule(function()
|
||||
vim.api.nvim_create_autocmd("User TelescopeKeymap", {
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
pattern = "TelescopeKeymap",
|
||||
once = true,
|
||||
callback = function()
|
||||
pcall(vim.api.nvim_win_close, km_win_id, true)
|
||||
|
||||
Reference in New Issue
Block a user