fix: avoid running the buf respect cwd on every open

This commit is contained in:
kiyan 2021-10-02 13:13:55 +02:00
parent 7c88a0f8ee
commit 8dbba0c2c9

View File

@ -473,7 +473,7 @@ function M.open()
view.open()
local respect_buf_cwd = vim.g.nvim_tree_respect_buf_cwd or 0
if M.Tree.loaded or (respect_buf_cwd == 1 and cwd ~= M.Tree.cwd) then
if M.Tree.loaded and (respect_buf_cwd == 1 and cwd ~= M.Tree.cwd) then
M.change_dir(cwd)
end
renderer.draw(M.Tree, not M.Tree.loaded)