Better fix for reload if current path is renamed (#2005)

This commit is contained in:
Joe Lim authored and GitHub committed 2025-06-07 20:12:31 +10:00
1 parent 320322c5cd
commit 249264b4cd
3 files changed
+26 -6

No files matched your search

+2 -2
View File
@@ -1488,8 +1488,8 @@ func (nav *nav) rename() error {
// existed and was deleted. In this case the cache entries should be deleted
// before loading newPath to prevent displaying a stale preview. However,
// this clears only the current instance of lf, and not any other instances.
delete(nav.regCache, newPath)
delete(nav.dirCache, newPath)
deletePathRecusrive(nav.regCache, newPath)
deletePathRecusrive(nav.dirCache, newPath)
dir := nav.loadDir(filepath.Dir(newPath))
if dir.loading {