add config to open or close automatically

This commit is contained in:
kiyan42
2020-03-04 13:15:33 +01:00
parent 03168a5155
commit 3678169bd6
5 changed files with 27 additions and 3 deletions

View File

@@ -37,7 +37,8 @@ init_tree()
local function toggle()
if is_win_open() == true then
close()
local wins = api.nvim_list_wins()
if #wins > 1 then close() end
else
open()
update_view()