diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-06-05 21:59:10 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-06-05 22:06:02 +0300 |
| commit | 556b16b2df7ea2c3e9b8ad13db4ad7370c1ad838 (patch) | |
| tree | 0a6f61701f2c8992c6cd1ee6d61171ef92a92533 /src/app/state.rs | |
| parent | ae3c88ab8c64931740d89623f688f7d3f408da5e (diff) | |
feat: add pane navigation controls
refs #421
refs #330
related discussions:
https://github.com/ogulcancelik/herdr/discussions/422
https://github.com/ogulcancelik/herdr/discussions/438
https://github.com/ogulcancelik/herdr/discussions/442
Diffstat (limited to 'src/app/state.rs')
| -rw-r--r-- | src/app/state.rs | 38 |
1 files changed, 34 insertions, 4 deletions
diff --git a/src/app/state.rs b/src/app/state.rs index a25c7c5e..e06fb3f5 100644 --- a/src/app/state.rs +++ b/src/app/state.rs @@ -1052,7 +1052,10 @@ pub enum ContextMenuKind { tab_idx: usize, }, Pane { + ws_idx: usize, + tab_idx: usize, pane_id: PaneId, + source_pane_id: Option<PaneId>, has_manual_label: bool, }, } @@ -1105,22 +1108,49 @@ impl ContextMenuState { ContextMenuKind::Tab { .. } => &["New tab", "Rename", "Close"], ContextMenuKind::Pane { has_manual_label: true, + source_pane_id: Some(_), + .. + } => &[ + "Rename pane", + "Clear pane name", + "Swap with focused pane", + "Split right", + "Split down", + "Zoom", + "Close pane", + ], + ContextMenuKind::Pane { + has_manual_label: false, + source_pane_id: Some(_), + .. + } => &[ + "Rename pane", + "Swap with focused pane", + "Split right", + "Split down", + "Zoom", + "Close pane", + ], + ContextMenuKind::Pane { + has_manual_label: true, + source_pane_id: None, .. } => &[ "Rename pane", "Clear pane name", - "Split vertical", - "Split horizontal", + "Split right", + "Split down", "Zoom", "Close pane", ], ContextMenuKind::Pane { has_manual_label: false, + source_pane_id: None, .. } => &[ "Rename pane", - "Split vertical", - "Split horizontal", + "Split right", + "Split down", "Zoom", "Close pane", ], |
