From 533ccdd16d6457ee8925e2b15af4287632e37eac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 05:12:27 +0000 Subject: [PATCH 1/2] Bump clap from 4.6.0 to 4.6.1 Bumps [clap](https://github.com/clap-rs/clap) from 4.6.0 to 4.6.1. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.6.0...clap_complete-v4.6.1) --- updated-dependencies: - dependency-name: clap dependency-version: 4.6.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- tui/Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5a813af..7eab43d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -145,9 +145,9 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "clap" -version = "4.6.0" +version = "4.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b193af5b67834b676abd72466a96c1024e6a6ad978a1f484bd90b85c94041351" +checksum = "1ddb117e43bbf7dacf0a4190fef4d345b9bad68dfc649cb349e7d17d28428e51" dependencies = [ "clap_builder", "clap_derive", @@ -167,9 +167,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.6.0" +version = "4.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1110bd8a634a1ab8cb04345d8d878267d57c3cf1b38d91b71af6686408bbca6a" +checksum = "f2ce8604710f6733aa641a2b3731eaa1e8b3d9973d5e3565da11800813f997a9" dependencies = [ "heck", "proc-macro2", diff --git a/tui/Cargo.toml b/tui/Cargo.toml index 8e70031..2589e55 100644 --- a/tui/Cargo.toml +++ b/tui/Cargo.toml @@ -14,7 +14,7 @@ default = [] syntax-highlighting = ["tree-sitter-highlight", "tree-sitter-bash"] [dependencies] -clap = { version = "4.5.47", features = ["derive"] } +clap = { version = "4.6.1", features = ["derive"] } oneshot = { version = "0.1.12", features = ["std"], default-features = false } portable-pty = "0.9.0" ratatui = { version = "0.29.0", features = ["crossterm"], default-features = false } From 2e7245700d3773d3449d0f9966882a60d462a8fb Mon Sep 17 00:00:00 2001 From: Jared Cervantes Date: Mon, 25 May 2026 21:51:03 -0400 Subject: [PATCH 2/2] clap fixes --- tui/src/filter.rs | 9 ++------- tui/src/main.rs | 6 ++---- tui/src/state.rs | 13 +++++++------ 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/tui/src/filter.rs b/tui/src/filter.rs index b06f079..b8a927c 100644 --- a/tui/src/filter.rs +++ b/tui/src/filter.rs @@ -91,13 +91,8 @@ impl Filter { } else { self.items.iter().find_map(|item| { let mut item_chars = item.node.name.chars(); - let mut search_chars = self.search_input.iter(); - loop { - // Take the next character from search input first, since we don't want to remove an extra character from the item - let Some(search_char) = search_chars.next() else { - break; - }; - + let search_chars = self.search_input.iter(); + for search_char in search_chars { // If the item is shorter than the search input, or a character doesn't match, skip this item let item_char = item_chars.next()?; if !item_char.eq_ignore_ascii_case(search_char) { diff --git a/tui/src/main.rs b/tui/src/main.rs index 7b2c32b..eaffa35 100644 --- a/tui/src/main.rs +++ b/tui/src/main.rs @@ -119,10 +119,8 @@ fn run(terminal: &mut Terminal>, state: &mut AppState) return Ok(()); } } - Event::Mouse(mouse_event) => { - if !state.handle_mouse(&mouse_event) { - return Ok(()); - } + Event::Mouse(mouse_event) if !state.handle_mouse(&mouse_event) => { + return Ok(()); } _ => {} } diff --git a/tui/src/state.rs b/tui/src/state.rs index 5f02b5e..bf7bf22 100644 --- a/tui/src/state.rs +++ b/tui/src/state.rs @@ -539,13 +539,14 @@ impl AppState { return true; } - match &mut self.focus { - Focus::FloatingWindow(command) => { - if command.handle_key_event(key) { - self.focus = Focus::List; - } - } + if let Focus::FloatingWindow(command) = &mut self.focus + && command.handle_key_event(key) + { + self.focus = Focus::List; + return true; + } + match &mut self.focus { Focus::ConfirmationPrompt(confirm) => { confirm.content.handle_key_event(key); match confirm.content.status {