fix: reload preview immediately after watch file modification (#2594)

* fix redundant reload

* optimize patch
This commit is contained in:
valoq authored and GitHub committed 2026-05-29 13:28:13 +10:00
1 parent 59a556c822
commit 468b32180d
1 file changed
+3 -2
+3 -2
View File
@@ -466,8 +466,9 @@ func (app *app) loop() {
dir.sel(name, app.nav.height)
}
delete(app.nav.regCache, f.path)
app.ui.loadFile(app, false)
if r, ok := app.nav.regCache[f.path]; ok {
app.nav.checkReg(r)
}
onLoad(app, []string{f.path})
app.ui.draw(app.nav)
case path := <-app.nav.delChan: