mirror of
https://seed.radicle.dev/rad:z39mP9rQAaGmERfUMPULfPUi473tY.git
synced 2026-11-01 09:20:33 +08:00
patch: Exit on ESC
This commit is contained in:
@@ -87,7 +87,7 @@ impl Widget<PatchesState, Action> 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"),
|
||||
],
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user