fix: abandon window and bufnr before editing file
fixes a vinegar mode issue
This commit is contained in:
@@ -147,8 +147,8 @@ function M.fn(mode, filename)
|
||||
end
|
||||
|
||||
if mode == "edit_in_place" then
|
||||
vim.cmd("edit " .. vim.fn.fnameescape(filename))
|
||||
require"nvim-tree.view".abandon_current_window()
|
||||
vim.cmd("edit " .. vim.fn.fnameescape(filename))
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
@@ -210,6 +210,7 @@ end
|
||||
|
||||
function M.abandon_current_window()
|
||||
local tab = a.nvim_get_current_tabpage()
|
||||
BUFNR = nil
|
||||
M.View.tabpages[tab] = { winnr = nil }
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user