fix: restrict preloading files (#2648)

* fix: restric preloading files

* improve patch
This commit is contained in:
valoq authored and GitHub committed 2026-07-31 17:06:12 +10:00
1 parent fb668f12be
commit 9a3b84e672
2 files changed
+5 -13

No files matched your search

-11
View File
@@ -471,17 +471,6 @@ func (app *app) loop() {
if r, ok := app.nav.regCache[f.path]; ok {
app.nav.checkReg(r)
} else {
r = &reg{loading: true, loadTime: time.Now(), path: f.path}
app.nav.regCache[f.path] = r
if gOpts.preload {
select {
case app.nav.preloadChan <- f.path:
default:
}
} else {
app.nav.previewChan <- f.path
}
}
onLoad(app, []string{f.path})
app.ui.draw(app.nav)