From e753b5b15932b58adcb90e8ac2bf35abb7bd39e5 Mon Sep 17 00:00:00 2001 From: Gokcehan Date: Mon, 31 Oct 2016 11:52:32 +0300 Subject: [PATCH] evaluate push command while reading --- ui.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ui.go b/ui.go index ae5280c..471f16a 100644 --- a/ui.go +++ b/ui.go @@ -634,13 +634,15 @@ func (ui *UI) readExpr(app *App) chan MultiExpr { expr := gOpts.keys[string(acc)] switch expr.(type) { case *CallExpr: - if expr.(*CallExpr).name == "read" || - expr.(*CallExpr).name == "read-shell" || - expr.(*CallExpr).name == "read-shell-wait" || - expr.(*CallExpr).name == "read-shell-async" { + switch expr.(*CallExpr).name { + case "read", + "read-shell", + "read-shell-wait", + "read-shell-async", + "push": expr.eval(app, nil) ui.draw(app.nav) - } else { + default: ch <- MultiExpr{expr, count} } default: