feat: force buffer delete for terminal and improvements for Picker:delete_selection (#1943)
This commit is contained in:
committed by
Simon Hauser
parent
6dc0a7d7c2
commit
a6c9ae088e
@@ -1020,7 +1020,9 @@ end
|
||||
actions.delete_buffer = function(prompt_bufnr)
|
||||
local current_picker = action_state.get_current_picker(prompt_bufnr)
|
||||
current_picker:delete_selection(function(selection)
|
||||
vim.api.nvim_buf_delete(selection.bufnr, { force = false })
|
||||
local force = vim.api.nvim_buf_get_option(selection.bufnr, "buftype") == "terminal"
|
||||
local ok = pcall(vim.api.nvim_buf_delete, selection.bufnr, { force = force })
|
||||
return ok
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user