refactor: avoid storing current preview separately (#2300)

This commit is contained in:
Joe Lim authored and GitHub committed 2025-12-12 16:59:32 +11:00
1 parent 0df05894ce
commit acb85d65c8
4 files changed
+43 -56

No files matched your search

+8
View File
@@ -987,6 +987,14 @@ func (nav *nav) sort() {
d.sort()
d.sel(name, nav.height)
}
if curr, err := nav.currFile(); err == nil {
if d, ok := nav.dirCache[curr.path]; ok {
name := d.name()
d.sort()
d.sel(name, nav.height)
}
}
}
func (nav *nav) setFilter(filter []string) error {