Skip to content

Commit

Permalink
Go to normal mode when backspacing on empty prompt (#836)
Browse files Browse the repository at this point in the history
This matches up with vim's behavior.
  • Loading branch information
SeekingBlues authored May 21, 2022
1 parent 2104a50 commit 36a7a18
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions eval.go
Original file line number Diff line number Diff line change
Expand Up @@ -1916,6 +1916,7 @@ func (e *callExpr) eval(app *app, args []string) {
update(app)
case "cmd-delete-back":
if len(app.ui.cmdAccLeft) == 0 {
normal(app)
return
}
app.ui.cmdAccLeft = app.ui.cmdAccLeft[:len(app.ui.cmdAccLeft)-1]
Expand Down

0 comments on commit 36a7a18

Please sign in to comment.