From 97cc5f78a8e7d51635d8740803ff4d70265b9f22 Mon Sep 17 00:00:00 2001 From: Olivier Perret Date: Mon, 26 Dec 2016 21:51:59 +0100 Subject: [PATCH] refresh preview when searching (#56) --- eval.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/eval.go b/eval.go index c5beff6..9f37827 100644 --- a/eval.go +++ b/eval.go @@ -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) }