diff options
| author | corrius <alvaro.correa@taxdown.es> | 2026-07-24 21:52:17 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-07-24 22:52:17 +0300 |
| commit | 38d2b0780c50e4773d6948660873386261cde71d (patch) | |
| tree | b899dd7ce1dfd1a70650be0209a48132c1539a25 /src/app/state.rs | |
| parent | e9b22084e03880f43d1f1daaf5d9f45c717b77c4 (diff) | |
feat: filter keybind help (#1832)
* feat: filter keybind help
refs #1825
* fix: recognize shifted slash in keybind help
---------
Co-authored-by: Ogulcan Celik <ogulcancelik@gmail.com>
Diffstat (limited to 'src/app/state.rs')
| -rw-r--r-- | src/app/state.rs | 10 |
1 files changed, 7 insertions, 3 deletions
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, |
