Skip to content

Commit

Permalink
fix: set noautocmd on the WhichKey window, so it works properly for o…
Browse files Browse the repository at this point in the history
…ther floats like Telescope
  • Loading branch information
folke committed Sep 11, 2022
1 parent 439637d commit 36fdfe8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lua/which-key/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ local defaults = {
-- Disabled by deafult for Telescope
disable = {
buftypes = {},
filetypes = { "TelescopePrompt" },
filetypes = {},
},
}

Expand Down
3 changes: 1 addition & 2 deletions lua/which-key/view.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ function M.show()
- vim.o.cmdheight,
col = config.options.window.margin[2],
style = "minimal",
noautocmd = true,
}
if config.options.window.position == "top" then
opts.anchor = "NW"
Expand All @@ -64,8 +65,6 @@ function M.show()
vim.api.nvim_win_set_option(M.win, "winhighlight", winhl)
vim.api.nvim_win_set_option(M.win, "foldmethod", "manual")
vim.api.nvim_win_set_option(M.win, "winblend", config.options.window.winblend)

vim.cmd([[autocmd! WinClosed <buffer> lua require("which-key.view").on_close()]])
end

function M.read_pending()
Expand Down

0 comments on commit 36fdfe8

Please sign in to comment.