fix(autocmds): fix q close for temp windows not working everywhere
This commit is contained in:
@@ -94,9 +94,8 @@ autocmd("BufWinEnter", {
|
||||
desc = "Make q close help, man, quickfix, dap floats",
|
||||
group = augroup("q_close_windows", { clear = true }),
|
||||
callback = function(event)
|
||||
local filetype = vim.api.nvim_get_option_value("filetype", { buf = event.buf })
|
||||
local buftype = vim.api.nvim_get_option_value("buftype", { buf = event.buf })
|
||||
if buftype == "nofile" or filetype == "help" then
|
||||
if vim.tbl_contains({ "help", "nofile", "quickfix" }, buftype) then
|
||||
vim.keymap.set("n", "q", "<cmd>close<cr>", {
|
||||
desc = "Close window",
|
||||
buffer = event.buf,
|
||||
|
||||
Reference in New Issue
Block a user