diff --git a/lua/telescope/actions/init.lua b/lua/telescope/actions/init.lua index 6123ee913e..8245f5850b 100644 --- a/lua/telescope/actions/init.lua +++ b/lua/telescope/actions/init.lua @@ -1018,7 +1018,7 @@ actions.delete_buffer = function(prompt_bufnr) local current_picker = action_state.get_current_picker(prompt_bufnr) current_picker:delete_selection(function(selection) local force = vim.api.nvim_buf_get_option(selection.bufnr, "buftype") == "terminal" - vim.api.nvim_buf_delete(selection.bufnr, { force = force }) + pcall(vim.api.nvim_buf_delete, selection.bufnr, { force = force }) end) end