suppress errors on switch to alt-file when deleting buffer

This commit is contained in:
Baipyrus 2024-10-17 11:16:51 +02:00
parent cbb6693cbf
commit d45de7ce83

View File

@ -47,7 +47,7 @@ vim.keymap.set('n', '<leader>bd', function()
-- Get current buffer
local buf = vim.api.nvim_get_current_buf()
-- Switch to different buffer
vim.cmd 'exe "norm \\<C-6>"'
vim.cmd 'silent! :exe "norm \\<C-6>"'
-- Delete saved buffer
vim.api.nvim_buf_delete(buf, {})
end, { desc = '[B]uffer [D]elete' })