When re-opening the tree buffer, navigate to the target window's working dir

This commit is contained in:
Joel D. Elkins
2021-01-13 13:17:51 -06:00
committed by Kiyan
parent 52a2905135
commit e935ec3bb0

View File

@@ -306,6 +306,9 @@ function M.open()
api.nvim_command('setlocal '..opt)
end
if M.Tree.loaded then
M.change_dir(vim.fn.getcwd())
end
renderer.draw(M.Tree, not M.Tree.loaded)
M.Tree.loaded = true