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)
|
||||
}
|
||||
|
||||
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:
|
||||
|
||||
Reference in new issue
Block a user