fix: execute autocmds correctly (#2375)
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user