Skip to content

Commit 0a13676

Browse files
committed
fix toggle command find file
1 parent 870590f commit 0a13676

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lua/nvim-tree.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ function M.toggle()
1515
if view.win_open() then
1616
view.close()
1717
else
18-
lib.open()
1918
if vim.g.nvim_tree_follow == 1 then
2019
M.find_file(true)
2120
end
21+
if not view.win_open() then
22+
lib.open()
23+
end
2224
end
2325
end
2426

0 commit comments

Comments
 (0)