chore(git): schedule status update and redraw when git status update is done
This commit is contained in:
parent
c1b112f0ec
commit
b31003e43a
@ -148,6 +148,7 @@ function M.update_status(entries, cwd, parent_node)
|
||||
end
|
||||
end
|
||||
end
|
||||
require'nvim-tree.lib'.redraw()
|
||||
end
|
||||
|
||||
---Check if the given path is ignored by git.
|
||||
|
||||
@ -51,6 +51,10 @@ function M.init(with_open, with_reload)
|
||||
end
|
||||
end
|
||||
|
||||
function M.redraw()
|
||||
renderer.draw(M.Tree, true)
|
||||
end
|
||||
|
||||
local function get_node_at_line(line)
|
||||
local index = 2
|
||||
local function iter(entries)
|
||||
|
||||
@ -343,7 +343,7 @@ function M.populate(entries, cwd, parent_node)
|
||||
return
|
||||
end
|
||||
|
||||
git.update_status(entries, cwd, parent_node)
|
||||
vim.schedule(function() git.update_status(entries, cwd, parent_node) end)
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
Loading…
Reference in New Issue
Block a user