Skip to content

Commit

Permalink
fix: execute autocmds correctly (#2375)
Browse files Browse the repository at this point in the history
(cherry picked from commit e572c63)
  • Loading branch information
josa42 authored and Conni2461 committed Feb 19, 2023
1 parent 77c216d commit 0b4e54e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lua/telescope/mappings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ mappings.execute_keymap = function(prompt_bufnr, keymap_identifier)
assert(key_func, string.format("Unsure of how we got this failure: %s %s", prompt_bufnr, keymap_identifier))

key_func(prompt_bufnr)
vim.api.nvim_exec_autocmds("User TelescopeKeymap", {})
vim.api.nvim_exec_autocmds("User", { pattern = "TelescopeKeymap" })
end

mappings.clear = function(prompt_bufnr)
Expand Down
2 changes: 1 addition & 1 deletion lua/telescope/pickers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ function Picker:find()
self.original_win_id = a.nvim_get_current_win()

-- User autocmd run it before create Telescope window
vim.api.nvim_exec_autocmds("User TelescopeFindPre", {})
vim.api.nvim_exec_autocmds("User", { pattern = "TelescopeFindPre" })

-- Create three windows:
-- 1. Prompt window
Expand Down

0 comments on commit 0b4e54e

Please sign in to comment.