fix: reload preview immediately after watch file modification (#2594)
* fix redundant reload * optimize patch
This commit is contained in:
1 parent
59a556c822
commit
468b32180d
1 file changed
+3
-2
@@ -466,8 +466,9 @@ func (app *app) loop() {
|
|||||||
dir.sel(name, app.nav.height)
|
dir.sel(name, app.nav.height)
|
||||||
}
|
}
|
||||||
|
|
||||||
delete(app.nav.regCache, f.path)
|
if r, ok := app.nav.regCache[f.path]; ok {
|
||||||
app.ui.loadFile(app, false)
|
app.nav.checkReg(r)
|
||||||
|
}
|
||||||
onLoad(app, []string{f.path})
|
onLoad(app, []string{f.path})
|
||||||
app.ui.draw(app.nav)
|
app.ui.draw(app.nav)
|
||||||
case path := <-app.nav.delChan:
|
case path := <-app.nav.delChan:
|
||||||
|
|||||||
Reference in new issue
Block a user