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
|
end
|
||||||
|
|
||||||
if mode == "edit_in_place" then
|
if mode == "edit_in_place" then
|
||||||
vim.cmd("edit " .. vim.fn.fnameescape(filename))
|
|
||||||
require"nvim-tree.view".abandon_current_window()
|
require"nvim-tree.view".abandon_current_window()
|
||||||
|
vim.cmd("edit " .. vim.fn.fnameescape(filename))
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -210,6 +210,7 @@ end
|
|||||||
|
|
||||||
function M.abandon_current_window()
|
function M.abandon_current_window()
|
||||||
local tab = a.nvim_get_current_tabpage()
|
local tab = a.nvim_get_current_tabpage()
|
||||||
|
BUFNR = nil
|
||||||
M.View.tabpages[tab] = { winnr = nil }
|
M.View.tabpages[tab] = { winnr = nil }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user