Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "q" key binding for exitting the app. #1

Merged
merged 2 commits into from
Jul 4, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add "q" key binding for quitting the app.
Tanapol Prucksakorn committed Jul 4, 2020
commit 97198c02d8974c55d97dd1f44d0bc91328bb127c
3 changes: 3 additions & 0 deletions src/tui/views.rs
Original file line number Diff line number Diff line change
@@ -538,6 +538,9 @@ impl<T: View> ViewWrapper for VimBindingsView<T> {
_ => self.last_event = None,
}
match event {
Event::Char('q') => {
return EventResult::with_cb(|s| s.quit());
}
Event::Char('h') => {
return self.view.on_event(Event::Key(Key::Left));
}