mirror of
https://github.com/Baipyrus/nvim-config.git
synced 2024-11-14 21:13:49 +00:00
suppress errors on switch to alt-file when deleting buffer
This commit is contained in:
parent
cbb6693cbf
commit
d45de7ce83
@ -47,7 +47,7 @@ vim.keymap.set('n', '<leader>bd', function()
|
|||||||
-- Get current buffer
|
-- Get current buffer
|
||||||
local buf = vim.api.nvim_get_current_buf()
|
local buf = vim.api.nvim_get_current_buf()
|
||||||
-- Switch to different buffer
|
-- Switch to different buffer
|
||||||
vim.cmd 'exe "norm \\<C-6>"'
|
vim.cmd 'silent! :exe "norm \\<C-6>"'
|
||||||
-- Delete saved buffer
|
-- Delete saved buffer
|
||||||
vim.api.nvim_buf_delete(buf, {})
|
vim.api.nvim_buf_delete(buf, {})
|
||||||
end, { desc = '[B]uffer [D]elete' })
|
end, { desc = '[B]uffer [D]elete' })
|
||||||
|
Loading…
Reference in New Issue
Block a user