mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-21 16:39:06 +02:00
fix(autocmds): close window and force delete buf on q. See #4638
This commit is contained in:
parent
0eb400908d
commit
cb40a09538
1 changed files with 2 additions and 1 deletions
|
@ -74,7 +74,8 @@ vim.api.nvim_create_autocmd("FileType", {
|
||||||
vim.bo[event.buf].buflisted = false
|
vim.bo[event.buf].buflisted = false
|
||||||
vim.schedule(function()
|
vim.schedule(function()
|
||||||
vim.keymap.set("n", "q", function()
|
vim.keymap.set("n", "q", function()
|
||||||
vim.api.nvim_buf_delete(event.buf, { force = true })
|
vim.cmd("close")
|
||||||
|
pcall(vim.api.nvim_buf_delete, event.buf, { force = true })
|
||||||
end, {
|
end, {
|
||||||
buffer = event.buf,
|
buffer = event.buf,
|
||||||
silent = true,
|
silent = true,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue