From 397d5e0faca4befabb76dc9f0a37ba2621295c64 Mon Sep 17 00:00:00 2001 From: Gokcehan Date: Sun, 20 May 2018 20:42:19 +0300 Subject: [PATCH] disable history when a command is running --- eval.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eval.go b/eval.go index e40d37c..65078e9 100644 --- a/eval.go +++ b/eval.go @@ -537,7 +537,7 @@ func (e *callExpr) eval(app *app, args []string) { log.Printf("entering unknown execution prefix: %q", app.ui.cmdPrefix) } case "cmd-history-next": - if app.ui.cmdPrefix == "" { + if app.ui.cmdPrefix == "" || app.ui.cmdPrefix == ">" { return } if app.cmdHistoryInd > 0 { @@ -556,6 +556,9 @@ func (e *callExpr) eval(app *app, args []string) { app.ui.cmdAccRight = nil app.ui.menuBuf = nil case "cmd-history-prev": + if app.ui.cmdPrefix == ">" { + return + } if app.ui.cmdPrefix == "" { app.cmdHistoryInd = 0 }