Go to normal mode when backspacing on empty prompt (#836)

This matches up with vim's behavior.
This commit is contained in:
SeekingBlues 2022-05-21 06:54:17 -04:00 committed by GitHub
parent 2104a501aa
commit 36a7a18316
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1916,6 +1916,7 @@ func (e *callExpr) eval(app *app, args []string) {
update(app) update(app)
case "cmd-delete-back": case "cmd-delete-back":
if len(app.ui.cmdAccLeft) == 0 { if len(app.ui.cmdAccLeft) == 0 {
normal(app)
return return
} }
app.ui.cmdAccLeft = app.ui.cmdAccLeft[:len(app.ui.cmdAccLeft)-1] app.ui.cmdAccLeft = app.ui.cmdAccLeft[:len(app.ui.cmdAccLeft)-1]