fix: prevent loading previews with outdated dimensions (#2491)

* fix preload size

* fix race

* skip height check

* fix loaded previews
This commit is contained in:
valoq authored and GitHub committed 2026-05-15 14:05:57 +10:00
1 parent 87d067c552
commit 2cd4ba016a
3 files changed
+6 -1

No files matched your search

+4
View File
@@ -436,6 +436,10 @@ func (app *app) loop() {
app.ui.draw(app.nav)
case r := <-app.nav.regChan:
if r.height != app.nav.height {
delete(app.nav.regCache, r.path)
continue
}
app.nav.regCache[r.path] = r
if curr := app.nav.currFile(); curr != nil {