feat: auto close: avoid force user to press Enter key to exit

with `let g:lua_tree_auto_close = 1`, while closing the tree when it's the last window,
neovim ask the user: "Press ENTER or type command to continue"

this patch should fixup the problem
This commit is contained in:
ttys3 2020-12-14 21:34:18 +08:00 committed by Kiyan
parent 9aa8be639d
commit c84b8b4ab9

View File

@ -154,7 +154,7 @@ end
function M.on_leave()
vim.defer_fn(function()
if #api.nvim_list_wins() == 1 and lib.win_open() then
api.nvim_command(':qa!')
api.nvim_command(':silent qa!')
end
end, 50)
end