From d6d5e4e8991d4a8ca8e4c727b3908ba9cddebb77 Mon Sep 17 00:00:00 2001 From: Erik Kundt Date: Wed, 28 Feb 2024 11:06:51 +0100 Subject: [PATCH] patch: Exit on ESC --- bin/commands/patch/flux/select/ui.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bin/commands/patch/flux/select/ui.rs b/bin/commands/patch/flux/select/ui.rs index 3deda069..9ca25afc 100644 --- a/bin/commands/patch/flux/select/ui.rs +++ b/bin/commands/patch/flux/select/ui.rs @@ -87,7 +87,7 @@ impl Widget for ListPage { fn handle_key_event(&mut self, key: termion::event::Key) { match key { - Key::Char('q') | Key::Ctrl('c') => { + Key::Esc | Key::Ctrl('c') => { let _ = self.action_tx.send(Action::Exit { selection: None }); } Key::Char('\n') => { @@ -166,14 +166,13 @@ impl Render<()> for ListPage { let layout = tui::flux::ui::layout::default_page(area, 0u16, 1u16); let shortcuts = match self.props.mode { - Mode::Id => vec![Shortcut::new("enter", "select"), Shortcut::new("q", "quit")], + Mode::Id => vec![Shortcut::new("enter", "select")], Mode::Operation => vec![ Shortcut::new("enter", "show"), Shortcut::new("c", "checkout"), Shortcut::new("m", "comment"), Shortcut::new("e", "edit"), Shortcut::new("d", "delete"), - Shortcut::new("q", "quit"), ], };