Feature: add the possibility to not focus tree on TabEnter when (#545)

This commit is contained in:
Matthieu ARENE
2021-08-07 10:02:03 +02:00
committed by GitHub
parent 143505b281
commit 8bb58daddb
2 changed files with 6 additions and 2 deletions

View File

@@ -264,7 +264,8 @@ local function set_local(opt, value)
vim.cmd(cmd)
end
function M.open()
function M.open(options)
options = options or { focus_tree = true }
if not is_buf_valid() then
M.setup()
end
@@ -282,6 +283,9 @@ function M.open()
set_local(k, v)
end
vim.cmd ":wincmd ="
if not options.focus_tree then
vim.cmd("wincmd p")
end
end
function M.close()