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

+1 -1
View File
@@ -855,7 +855,7 @@ func (nav *nav) preload() {
}
func (nav *nav) preview(path string, win *win, mode string) {
reg := &reg{loadTime: time.Now(), path: path}
reg := &reg{loadTime: time.Now(), path: path, height: win.h}
defer func() {
if (gOpts.preload && mode == "preview") || (!gOpts.preload && reg.volatile) {
nav.volatilePreview = true