From e935ec3bb073e8d5e863645e3f4620cb78617946 Mon Sep 17 00:00:00 2001 From: "Joel D. Elkins" Date: Wed, 13 Jan 2021 13:17:51 -0600 Subject: [PATCH] When re-opening the tree buffer, navigate to the target window's working dir --- lua/lib/lib.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/lib/lib.lua b/lua/lib/lib.lua index 697a6114..eaa264f3 100644 --- a/lua/lib/lib.lua +++ b/lua/lib/lib.lua @@ -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