aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Jahn <ajjahn@gmail.com>2025-09-09 06:23:11 -0400
committerGitHub <noreply@github.com>2025-09-09 11:23:11 +0100
commitf517d334d0b54d52f85aa5c3f837931be6fa8a5e (patch)
treefa0c9c7d90cb6993e3b416cfc01564775de521ff
parentfix: expand path for daemon.socket_path (#2870) (diff)
downloadatuin-f517d334d0b54d52f85aa5c3f837931be6fa8a5e.zip
feat(tui): select entries using number in vim-normal mode. closes #2368 (#2893)
<!-- Thank you for making a PR! Bug fixes are always welcome, but if you're adding a new feature or changing an existing one, we'd really appreciate if you open an issue, post on the forum, or drop in on Discord --> ## 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
-rw-r--r--crates/atuin/src/command/client/search/interactive.rs5
1 files changed, 5 insertions, 0 deletions
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;
}