From 42a875aa006239d5b688f56ac37ff58c5aab1b69 Mon Sep 17 00:00:00 2001 From: kiyan42 Date: Mon, 15 Feb 2021 09:57:43 +0100 Subject: [PATCH] fix: do not run refresh if vim.v.exiting is set --- lua/lib/lib.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/lib/lib.lua b/lua/lib/lib.lua index 29768c11..6d5ba4d9 100644 --- a/lua/lib/lib.lua +++ b/lua/lib/lib.lua @@ -122,10 +122,10 @@ end function M.refresh_tree() vim.schedule( function () - -- local stat = luv.fs_stat(M.Tree.cwd) - -- if stat.mtime.sec ~= M.Tree.last_modified then + if vim.v.exiting ~= nil then return end + refresh_nodes(M.Tree) - -- end + if config.get_icon_state().show_git_icon or vim.g.nvim_tree_git_hl then git.reload_roots() refresh_git(M.Tree)