fix: focus view if view is open on nvim-tree.open

This commit is contained in:
kiyan
2022-02-16 20:51:52 +01:00
parent bf697d782d
commit 015e7e8611

View File

@@ -37,7 +37,9 @@ end
function M.open(cwd)
cwd = cwd ~= "" and cwd or nil
if not view.is_visible() then
if view.is_visible() then
view.focus()
else
lib.open(cwd)
end
end