Remove changed files/dirs from TreeView cache
This commit is contained in:
+1
-1
@@ -1157,7 +1157,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
-- no-op but can be overrided by plugins
|
-- no-op but can be overrided by plugins
|
||||||
function core.on_dirmonitor_modify()
|
function core.on_dirmonitor_modify(dir, filepath)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,14 @@ function TreeView:new()
|
|||||||
self.target_size = default_treeview_size
|
self.target_size = default_treeview_size
|
||||||
self.cache = {}
|
self.cache = {}
|
||||||
self.tooltip = { x = 0, y = 0, begin = 0, alpha = 0 }
|
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
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user