Skip to content

Commit e922baa

Browse files
committed
fix: prevent tabnew leave a dangling "[No Name]" buffer
1 parent 26dd7db commit e922baa

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lua/nvim-tree/actions/node/open-file.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ local function open_file_in_tab(filename)
199199
filename = utils.path_relative(filename, vim.fn.getcwd())
200200
end
201201
vim.cmd.tabnew()
202+
vim.bo.bufhidden = "wipe"
202203
-- HACK: prevent NvimTree to be alternate buffer
203204
if utils.is_nvim_tree_buf(vim.fn.bufnr("#")) then
204205
local tmpbuf = vim.api.nvim_create_buf(false, true)

0 commit comments

Comments
 (0)