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

-4
View File
@@ -423,9 +423,6 @@ func (app *app) loop() {
if curr.path != oldCurrPath {
app.ui.loadFile(app, true)
}
if d.path == curr.path {
app.ui.dirPrev = d
}
}
app.watchDir(d)
@@ -447,7 +444,6 @@ func (app *app) loop() {
curr, err := app.nav.currFile()
if err == nil {
if r.path == curr.path {
app.ui.regPrev = r
app.ui.sxScreen.forceClear = true
if gOpts.preload && r.volatile {
app.ui.loadFile(app, true)