in normal mode, when we receive an event which we don't want to handle (like enter), we clear the app's mode and command history instead of simply returning the same app unmodified. This fixes a bug: say we pres 'f' to go to a character and then press enter. Before this commit, pressing a character after that 'enter' will go to that character. This is contrary to Vim, which resets the command history on an invalid command, and now we reset the command history too.
This commit is contained in:
@@ -401,10 +401,10 @@ struct
|
|||||||
* is also possible through other keys,
|
* is also possible through other keys,
|
||||||
* and it is better to use those othe keys to encourage
|
* and it is better to use those othe keys to encourage
|
||||||
* staying on the home row. *)
|
* staying on the home row. *)
|
||||||
| KEY_ENTER => app
|
| KEY_ENTER => NormalFinish.clearMode app
|
||||||
| KEY_BACKSPACE => app
|
| KEY_BACKSPACE => NormalFinish.clearMode app
|
||||||
| ARROW_RIGHT => app
|
| ARROW_RIGHT => NormalFinish.clearMode app
|
||||||
| ARROW_LEFT => app
|
| ARROW_LEFT => NormalFinish.clearMode app
|
||||||
| ARROW_UP => app
|
| ARROW_UP => NormalFinish.clearMode app
|
||||||
| ARROW_DOWN => app
|
| ARROW_DOWN => NormalFinish.clearMode app
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user