fix: do not run refresh if tree cwd is nil

This commit is contained in:
kiyan
2021-09-30 13:11:05 +02:00
parent acfb3c0bfb
commit c0cd3aeb65

View File

@@ -174,7 +174,9 @@ end
local refreshing = false
function M.refresh_tree(disable_clock)
if (not disable_clock and refreshing) or vim.v.exiting ~= vim.NIL then return end
if not M.Tree.cwd or (not disable_clock and refreshing) or vim.v.exiting ~= vim.NIL then
return
end
refreshing = true
refresh_nodes(M.Tree)