Skip to content

Commit c4da4a4

Browse files
committed
fix: use pcall for buffer wipe on file deletion, fixes #143
1 parent 8197313 commit c4da4a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/neo-tree/sources/filesystem/lib/fs_actions.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ local M = {}
1818
local function clear_buffer(path)
1919
for _, buf in pairs(api.nvim_list_bufs()) do
2020
if api.nvim_buf_get_name(buf) == path then
21-
api.nvim_command(":bwipeout! " .. buf)
21+
pcall(vim.api.nvim_buf_delete, buf, { force = true })
2222
end
2323
end
2424
end

0 commit comments

Comments
 (0)