From fbb1a5f3815105688a8abe744e45b1ee397f5a17 Mon Sep 17 00:00:00 2001 From: Braelyn Boynton Date: Tue, 19 Nov 2024 04:27:10 -0800 Subject: [PATCH] use or within match --- crates/atuin/src/command/client/search/interactive.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/crates/atuin/src/command/client/search/interactive.rs b/crates/atuin/src/command/client/search/interactive.rs index e9d6fb144ee..53ede383385 100644 --- a/crates/atuin/src/command/client/search/interactive.rs +++ b/crates/atuin/src/command/client/search/interactive.rs @@ -220,14 +220,11 @@ impl State { KeyCode::Char('c' | 'g') if ctrl => Some(InputAction::ReturnOriginal), KeyCode::Esc if esc_allow_exit => Some(Self::handle_key_exit(settings)), KeyCode::Char('[') if ctrl && esc_allow_exit => Some(Self::handle_key_exit(settings)), - KeyCode::Tab => Some(InputAction::Accept(self.results_state.selected())), - KeyCode::Right => Some(InputAction::Accept(self.results_state.selected())), KeyCode::Char('o') if ctrl => { self.tab_index = (self.tab_index + 1) % TAB_TITLES.len(); - Some(InputAction::Continue) - } - + }, + KeyCode::Tab | KeyCode::Right => Some(InputAction::Accept(self.results_state.selected())), _ => None, };