summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTanapol Prucksakorn <tanapol.pr@gmail.com>2020-07-04 15:49:48 +0900
committerTanapol Prucksakorn <tanapol.pr@gmail.com>2020-07-04 15:49:48 +0900
commit97198c02d8974c55d97dd1f44d0bc91328bb127c (patch)
tree68636eb5e3e9072851376c2b60293e1384b4dbb5
parente332a12eca11d8af61df75a388eed72e73324f89 (diff)
Add "q" key binding for quitting the app.
-rw-r--r--src/tui/views.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tui/views.rs b/src/tui/views.rs
index f191830..a7d3885 100644
--- a/src/tui/views.rs
+++ b/src/tui/views.rs
@@ -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));
}