Skip to content

Commit 550055e

Browse files
authored
fix: correctly create User autocmd in action.which_key (#2736)
1 parent fd00a0a commit 550055e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lua/telescope/actions/init.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1409,7 +1409,8 @@ actions.which_key = function(prompt_bufnr, opts)
14091409
-- only set up autocommand after showing preview completed
14101410
if opts.close_with_action then
14111411
vim.schedule(function()
1412-
vim.api.nvim_create_autocmd("User TelescopeKeymap", {
1412+
vim.api.nvim_create_autocmd("User", {
1413+
pattern = "TelescopeKeymap",
14131414
once = true,
14141415
callback = function()
14151416
pcall(vim.api.nvim_win_close, km_win_id, true)

0 commit comments

Comments
 (0)