Skip to content

Commit 5808f35

Browse files
committed
refactor(#1645): remove unused open_replacing_current_buffer
1 parent 05f55c1 commit 5808f35

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

lua/nvim-tree.lua

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -73,29 +73,6 @@ function M.change_root(path, bufnr)
7373
change_dir.fn(vim.fn.fnamemodify(path, ":p:h"))
7474
end
7575

76-
function M.open_replacing_current_buffer(cwd)
77-
if view.is_visible() then
78-
return
79-
end
80-
81-
local buf = vim.api.nvim_get_current_buf()
82-
local bufname = vim.api.nvim_buf_get_name(buf)
83-
if bufname == "" or vim.loop.fs_stat(bufname) == nil then
84-
return
85-
end
86-
87-
if cwd == "" or cwd == nil then
88-
cwd = vim.fn.fnamemodify(bufname, ":p:h")
89-
end
90-
91-
if not core.get_explorer() or cwd ~= core.get_cwd() then
92-
core.init(cwd)
93-
end
94-
view.open_in_win { hijack_current_buf = false, resize = false }
95-
require("nvim-tree.renderer").draw()
96-
require("nvim-tree.actions.finders.find-file").fn(bufname)
97-
end
98-
9976
function M.tab_enter()
10077
if view.is_visible { any_tabpage = true } then
10178
local bufname = vim.api.nvim_buf_get_name(0)

0 commit comments

Comments
 (0)