Skip to content

Commit

Permalink
Disallow exiting from rename: mode with backspace
Browse files Browse the repository at this point in the history
After looking at the list of possibilities for `app.ui.cmdPrefix`
by searching through the code, renaming is the only remaining mode
where exiting via backspace doesn't make sense.

If I missed something, please let me know. I can fix it here
or in a subsequent PR, depending on when we find out.

Fixes #1052, #1059
  • Loading branch information
ilyagr committed Dec 28, 2022
1 parent aa78b26 commit 74a564d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions eval.go
Original file line number Diff line number Diff line change
Expand Up @@ -1887,8 +1887,9 @@ func (e *callExpr) eval(app *app, args []string) {
switch app.ui.cmdPrefix {
case "!", "$", "%", "&":
app.ui.cmdPrefix = ":"
case ">":
// Don't mess with the program waiting for input
case ">", "rename: ":
// Don't mess with the programs waiting for input
// Exiting on backspace is also inconvenient for renames
default:
normal(app)
}
Expand Down

0 comments on commit 74a564d

Please sign in to comment.