From c84b8b4ab9944ce7d248b9b34000403648506947 Mon Sep 17 00:00:00 2001 From: ttys3 Date: Mon, 14 Dec 2020 21:34:18 +0800 Subject: [PATCH] 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 --- lua/tree.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/tree.lua b/lua/tree.lua index fe26ac6b..e757bd3a 100644 --- a/lua/tree.lua +++ b/lua/tree.lua @@ -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