Merge pull request #697 from Guldoman/treeview_remove_changed

Remove changed files/dirs from `TreeView` cache
This commit is contained in:
Adam
2021-11-26 22:07:19 -05:00
committed by GitHub
2 changed files with 9 additions and 1 deletions
+1 -1
View File
@@ -1156,7 +1156,7 @@ end
-- no-op but can be overrided by plugins
function core.on_dirmonitor_modify()
function core.on_dirmonitor_modify(dir, filepath)
end
+8
View File
@@ -42,6 +42,14 @@ function TreeView:new()
self.target_size = default_treeview_size
self.cache = {}
self.tooltip = { x = 0, y = 0, begin = 0, alpha = 0 }
local on_dirmonitor_modify = core.on_dirmonitor_modify
function core.on_dirmonitor_modify(dir, filepath)
if self.cache[dir.name] then
self.cache[dir.name][filepath] = nil
end
on_dirmonitor_modify(dir, filepath)
end
end