We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 87d096a commit 26dd7dbCopy full SHA for 26dd7db
lua/nvim-tree/actions/node/open-file.lua
@@ -198,7 +198,14 @@ local function open_file_in_tab(filename)
198
if M.relative_path then
199
filename = utils.path_relative(filename, vim.fn.getcwd())
200
end
201
- vim.cmd("tabe " .. vim.fn.fnameescape(filename))
+ vim.cmd.tabnew()
202
+ -- HACK: prevent NvimTree to be alternate buffer
203
+ if utils.is_nvim_tree_buf(vim.fn.bufnr("#")) then
204
+ local tmpbuf = vim.api.nvim_create_buf(false, true)
205
+ vim.fn.setreg("#", tmpbuf)
206
+ vim.api.nvim_buf_delete(tmpbuf, { force = true })
207
+ end
208
+ vim.cmd.edit(vim.fn.fnameescape(filename))
209
210
211
local function drop(filename)
0 commit comments