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

This matches up with vim's behavior.
This commit is contained in:
SeekingBlues authored and GitHub committed 2022-05-21 13:54:17 +03:00
1 parent 2104a501aa
commit 36a7a18316
1 file changed
+1
+1
View File
@@ -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]