From 556b16b2df7ea2c3e9b8ad13db4ad7370c1ad838 Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Fri, 5 Jun 2026 21:59:10 +0300 Subject: 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 --- src/app/state.rs | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) (limited to 'src/app/state.rs') 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, 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", ], -- cgit v1.2.3