Skip to content

Commit e19eb5c

Browse files
kyazdani42jim-fx
authored andcommitted
fix: remove buffer when replacing window
1 parent 9f7b563 commit e19eb5c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lua/nvim-tree.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@ function M.open_on_directory()
315315
view.close()
316316
end
317317
M.hijack_current_window()
318+
vim.api.nvim_buf_delete(buf, { force = true })
318319
lib.change_dir(bufname)
319320
lib.set_index_and_redraw(bufname)
320321
view.focus()

0 commit comments

Comments
 (0)