diff options
author | Sam Tay <sam.chong.tay@gmail.com> | 2020-07-04 14:18:31 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-04 14:18:31 -0700 |
commit | d5b313d2eeb83c4c4aebb8bd0d006700298f63da (patch) | |
tree | a4f55386a1d6e17e5083e17ca230189300922e85 /src/tui/views.rs | |
parent | e332a12eca11d8af61df75a388eed72e73324f89 (diff) | |
parent | 4fcb633662aea1cdc941a51147a91354d0b53988 (diff) |
Merge pull request #1 from zynaxsoft/feat/quit-on-q
Add "q" key binding for exitting the app.
Diffstat (limited to 'src/tui/views.rs')
-rw-r--r-- | src/tui/views.rs | 3 |
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)); } |