diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-11 23:31:36 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-11 23:34:20 +0300 |
| commit | fe693f613a23452e68589a4337863f217cc57930 (patch) | |
| tree | 8d60f6c5b0d8b31426c6623cc8b0c2415d481000 /src/app/input/mouse.rs | |
| parent | 84c0d003ddb19a8e95e7ad5206771a663913605b (diff) | |
feat: add optional pane border labels
Diffstat (limited to 'src/app/input/mouse.rs')
| -rw-r--r-- | src/app/input/mouse.rs | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/app/input/mouse.rs b/src/app/input/mouse.rs index 4a074a2e..f7997807 100644 --- a/src/app/input/mouse.rs +++ b/src/app/input/mouse.rs @@ -137,7 +137,10 @@ impl AppState { return None; } - if matches!(self.mode, Mode::RenameWorkspace | Mode::RenameTab) { + if matches!( + self.mode, + Mode::RenameWorkspace | Mode::RenameTab | Mode::RenamePane + ) { let action = self .rename_modal_inner() .map(crate::ui::rename_button_rects) @@ -678,8 +681,17 @@ impl AppState { MouseEventKind::Down(MouseButton::Right) if !in_sidebar => { if let Some(info) = self.pane_mouse_target(mouse.column, mouse.row).cloned() { self.focus_pane(info.id); + let has_manual_label = self + .active + .and_then(|ws_idx| self.workspaces.get(ws_idx)) + .and_then(|ws| ws.pane_state(info.id)) + .and_then(|pane| pane.manual_label.as_ref()) + .is_some(); self.context_menu = Some(ContextMenuState { - kind: ContextMenuKind::Pane, + kind: ContextMenuKind::Pane { + pane_id: info.id, + has_manual_label, + }, x: mouse.column, y: mouse.row, list: MenuListState::new(0), |
