From 38d2b0780c50e4773d6948660873386261cde71d Mon Sep 17 00:00:00 2001 From: corrius Date: Fri, 24 Jul 2026 21:52:17 +0200 Subject: feat: filter keybind help (#1832) * feat: filter keybind help refs #1825 * fix: recognize shifted slash in keybind help --------- Co-authored-by: Ogulcan Celik --- src/app/state.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/app/state.rs') diff --git a/src/app/state.rs b/src/app/state.rs index f8395cbd..b9e4ed70 100644 --- a/src/app/state.rs +++ b/src/app/state.rs @@ -821,8 +821,9 @@ impl Mode { /// `sync_prefix_input_source` (gated by `switch_ascii_input_source_in_prefix`) so multi-level /// prefix commands keep ASCII until they return to the terminal. /// - /// Known limitation: `Navigator`'s search box is also held on ASCII, since this `Mode`-level - /// predicate can't see `search_focused` (non-ASCII filtering there would need a runtime check). + /// Known limitation: the search boxes in `Navigator` and `KeybindHelp` are also held on ASCII, + /// since this `Mode`-level predicate can't see `search_focused` (non-ASCII filtering there + /// would need a runtime check). pub(crate) fn wants_ascii_input(self) -> bool { matches!( self, @@ -1381,8 +1382,11 @@ pub struct ProductAnnouncementState { pub preview: bool, } +#[derive(Default)] pub struct KeybindHelpState { pub scroll: u16, + pub query: String, + pub search_focused: bool, } #[derive(Debug, Clone, Copy, PartialEq, Eq)] @@ -1818,7 +1822,7 @@ impl AppState { name_input_replace_on_type: false, release_notes: None, product_announcement: None, - keybind_help: KeybindHelpState { scroll: 0 }, + keybind_help: KeybindHelpState::default(), navigator: NavigatorState::default(), copy_mode: None, workspace_scroll: 0, -- cgit v1.2.3