wrap refresh logic in vim.schedule callback
This commit is contained in:
@@ -118,6 +118,8 @@ local function refresh_nodes(node)
|
||||
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
|
||||
refresh_nodes(M.Tree)
|
||||
@@ -131,6 +133,7 @@ function M.refresh_tree()
|
||||
else
|
||||
M.Tree.loaded = false
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
function M.set_index_and_redraw(fname)
|
||||
|
||||
Reference in New Issue
Block a user