Skip to content

Commit

Permalink
disable history when a command is running
Browse files Browse the repository at this point in the history
  • Loading branch information
gokcehan committed May 20, 2018
1 parent 9400f07 commit 397d5e0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion eval.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
}
Expand Down

0 comments on commit 397d5e0

Please sign in to comment.