preview files asynchronously

Mentioned in #5 and #92.
This commit is contained in:
Gokcehan committed 2018-01-28 20:13:28 +03:00
1 parent 59b2001253
commit 80f43fe39c
2 files changed
+82 -52

No files matched your search

+9
View File
@@ -106,6 +106,15 @@ func (app *app) loop() {
}
}
app.ui.draw(app.nav)
case p := <-app.ui.prevChan:
curr, err := app.nav.currFile()
if err == nil {
if p.path == curr.path {
app.ui.regPrev = p.lines
}
}
app.ui.draw(app.nav)
case e := <-clientChan:
for i := 0; i < e.count; i++ {