From f517d334d0b54d52f85aa5c3f837931be6fa8a5e Mon Sep 17 00:00:00 2001 From: Adam Jahn Date: Tue, 9 Sep 2025 06:23:11 -0400 Subject: feat(tui): select entries using number in vim-normal mode. closes #2368 (#2893) ## Checks - [x] I am happy for maintainers to push small adjustments to this PR, to speed up the review cycle - [x] I have checked that there are no existing pull requests for the same thing --- crates/atuin/src/command/client/search/interactive.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/atuin/src/command/client/search/interactive.rs b/crates/atuin/src/command/client/search/interactive.rs index cddd5b2b..51a94f45 100644 --- a/crates/atuin/src/command/client/search/interactive.rs +++ b/crates/atuin/src/command/client/search/interactive.rs @@ -370,6 +370,11 @@ impl State { self.keymap_mode = KeymapMode::VimInsert; return InputAction::Continue; } + KeyCode::Char(c @ '1'..='9') => { + return c.to_digit(10).map_or(InputAction::Continue, |c| { + InputAction::Accept(self.results_state.selected() + c as usize) + }); + } KeyCode::Char(_) if !ctrl => { return InputAction::Continue; } -- cgit v1.3.1