forked from trinitrix/core
fix(handlers/main)!: Change exit key to `q`
`Esc` is bound to exit a deeper mode (like `insert` or `command`) and return to `normal` mode. This however is rather inconvenient, when `Esc` also exits Trinitrix in general, as spamming `Esc` then becomes impossible. This changes also puts Trinitrix more in line with vim (although vim does not allow exiting with `q`). BREAKING CHANGE: To exit press `q` instead of `Esc`.
This commit is contained in:
parent
74f3b25827
commit
7aea23f3b6
|
@ -58,7 +58,8 @@ pub async fn handle_command(
|
|||
pub async fn handle_normal(app: &mut App<'_>, input_event: &CrosstermEvent) -> Result<EventStatus> {
|
||||
match input_event {
|
||||
CrosstermEvent::Key(KeyEvent {
|
||||
code: KeyCode::Esc, ..
|
||||
code: KeyCode::Char('q'),
|
||||
..
|
||||
}) => {
|
||||
app.tx
|
||||
.send(Event::CommandEvent(Command::Exit, None))
|
||||
|
|
Loading…
Reference in New Issue