refresh preview when searching (#56)
This commit is contained in:
parent
8be854d3ba
commit
97cc5f78a8
8
eval.go
8
eval.go
@ -275,8 +275,12 @@ func (e *callExpr) eval(app *app, args []string) {
|
|||||||
app.ui.cmdpref = "?"
|
app.ui.cmdpref = "?"
|
||||||
case "search-next":
|
case "search-next":
|
||||||
app.nav.searchNext()
|
app.nav.searchNext()
|
||||||
|
app.ui.loadFile(app.nav)
|
||||||
|
app.ui.loadFileInfo(app.nav)
|
||||||
case "search-prev":
|
case "search-prev":
|
||||||
app.nav.searchPrev()
|
app.nav.searchPrev()
|
||||||
|
app.ui.loadFile(app.nav)
|
||||||
|
app.ui.loadFileInfo(app.nav)
|
||||||
case "toggle":
|
case "toggle":
|
||||||
app.nav.toggle()
|
app.nav.toggle()
|
||||||
case "invert":
|
case "invert":
|
||||||
@ -422,10 +426,14 @@ func (e *callExpr) eval(app *app, args []string) {
|
|||||||
log.Printf("search: %s", s)
|
log.Printf("search: %s", s)
|
||||||
app.nav.search = s
|
app.nav.search = s
|
||||||
app.nav.searchNext()
|
app.nav.searchNext()
|
||||||
|
app.ui.loadFile(app.nav)
|
||||||
|
app.ui.loadFileInfo(app.nav)
|
||||||
case "?":
|
case "?":
|
||||||
log.Printf("search-back: %s", s)
|
log.Printf("search-back: %s", s)
|
||||||
app.nav.search = s
|
app.nav.search = s
|
||||||
app.nav.searchPrev()
|
app.nav.searchPrev()
|
||||||
|
app.ui.loadFile(app.nav)
|
||||||
|
app.ui.loadFileInfo(app.nav)
|
||||||
default:
|
default:
|
||||||
log.Printf("entering unknown execution prefix: %q", app.ui.cmdpref)
|
log.Printf("entering unknown execution prefix: %q", app.ui.cmdpref)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user