From d45de7ce83ec89676e1eccd2e1c3213141323f5c Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Thu, 17 Oct 2024 11:16:51 +0200 Subject: [PATCH] suppress errors on switch to alt-file when deleting buffer --- lua/keymaps.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/keymaps.lua b/lua/keymaps.lua index fb6a6ac..8bd1762 100644 --- a/lua/keymaps.lua +++ b/lua/keymaps.lua @@ -47,7 +47,7 @@ vim.keymap.set('n', 'bd', function() -- Get current buffer local buf = vim.api.nvim_get_current_buf() -- Switch to different buffer - vim.cmd 'exe "norm \\"' + vim.cmd 'silent! :exe "norm \\"' -- Delete saved buffer vim.api.nvim_buf_delete(buf, {}) end, { desc = '[B]uffer [D]elete' })