refresh preview when searching (#56)

This commit is contained in:
Olivier Perret 2016-12-26 21:51:59 +01:00 committed by gokcehan
parent 8be854d3ba
commit 97cc5f78a8

View File

@ -275,8 +275,12 @@ func (e *callExpr) eval(app *app, args []string) {
app.ui.cmdpref = "?"
case "search-next":
app.nav.searchNext()
app.ui.loadFile(app.nav)
app.ui.loadFileInfo(app.nav)
case "search-prev":
app.nav.searchPrev()
app.ui.loadFile(app.nav)
app.ui.loadFileInfo(app.nav)
case "toggle":
app.nav.toggle()
case "invert":
@ -422,10 +426,14 @@ func (e *callExpr) eval(app *app, args []string) {
log.Printf("search: %s", s)
app.nav.search = s
app.nav.searchNext()
app.ui.loadFile(app.nav)
app.ui.loadFileInfo(app.nav)
case "?":
log.Printf("search-back: %s", s)
app.nav.search = s
app.nav.searchPrev()
app.ui.loadFile(app.nav)
app.ui.loadFileInfo(app.nav)
default:
log.Printf("entering unknown execution prefix: %q", app.ui.cmdpref)
}