diff --git a/lua/nvim-tree.lua b/lua/nvim-tree.lua index 35f10c33..f1b8f74f 100644 --- a/lua/nvim-tree.lua +++ b/lua/nvim-tree.lua @@ -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