fix(#1804): do not refresh watched nodes that have been destroyed (deleted)

This commit is contained in:
Alexander Courtis
2022-12-19 14:36:42 +11:00
parent e0cfbbb93d
commit d949af7245
4 changed files with 11 additions and 0 deletions

View File

@@ -150,6 +150,9 @@ function M.load_project_status(cwd)
local callback = function(w)
log.line("watcher", "git event scheduled '%s'", w.project_root)
utils.debounce("git:watcher:" .. w.project_root, M.config.filesystem_watchers.debounce_delay, function()
if w.destroyed then
return
end
reload_tree_at(w.project_root)
end)
end