From e0de49538586f3d7b2bdeabd92c57e34f2b3b26b Mon Sep 17 00:00:00 2001 From: Alan Martinovic Date: Sat, 21 May 2022 21:56:54 +0200 Subject: [PATCH] Reduce error verbosity --- lua/telescope/actions/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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