aboutsummaryrefslogtreecommitdiff
path: root/src/app/state.rs
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-04-02 23:13:47 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-04-02 23:25:10 +0300
commit290a57e3331bb25dcd16284099bf1dc6afa68ee5 (patch)
tree8c65e20a815e15dd692ee4c5a5e547c172f148f3 /src/app/state.rs
parent1eb7dac77e7b62ece76c43d75a349580f936b2c6 (diff)
feat: add direct pane navigation keybinds
Diffstat (limited to 'src/app/state.rs')
-rw-r--r--src/app/state.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/app/state.rs b/src/app/state.rs
index 91e9061e..dee805cd 100644
--- a/src/app/state.rs
+++ b/src/app/state.rs
@@ -461,6 +461,9 @@ pub(crate) enum DragTarget {
ReleaseNotesScrollbar {
grab_row_offset: u16,
},
+ KeybindHelpScrollbar {
+ grab_row_offset: u16,
+ },
SidebarDivider,
}
@@ -520,6 +523,10 @@ pub struct ReleaseNotesState {
pub preview: bool,
}
+pub struct KeybindHelpState {
+ pub scroll: u16,
+}
+
/// All application state — pure data, no channels or async runtime.
/// Testable without PTYs or a tokio runtime.
pub struct AppState {
@@ -535,6 +542,7 @@ pub struct AppState {
pub onboarding_step: usize,
pub onboarding_list: SelectionListState,
pub release_notes: Option<ReleaseNotesState>,
+ pub keybind_help: KeybindHelpState,
// View geometry (computed before render, consumed by render + mouse)
pub view: ViewState,
pub(crate) drag: Option<DragState>,
@@ -627,6 +635,7 @@ impl AppState {
onboarding_step: 0,
onboarding_list: SelectionListState::new(1),
release_notes: None,
+ keybind_help: KeybindHelpState { scroll: 0 },
view: ViewState {
sidebar_rect: Rect::default(),
tab_bar_rect: Rect::default(),
@@ -676,6 +685,14 @@ impl AppState {
next_tab_label: None,
close_tab: None,
close_tab_label: None,
+ focus_pane_left: None,
+ focus_pane_left_label: None,
+ focus_pane_down: None,
+ focus_pane_down_label: None,
+ focus_pane_up: None,
+ focus_pane_up_label: None,
+ focus_pane_right: None,
+ focus_pane_right_label: None,
split_vertical: (KeyCode::Char('v'), KeyModifiers::empty()),
split_vertical_label: "v".into(),
split_horizontal: (KeyCode::Char('-'), KeyModifiers::empty()),