diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-28 04:18:55 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-28 04:51:05 +0300 |
| commit | 37bdff5bbe7f6b50dce2d8920a08bdaafd4fecda (patch) | |
| tree | 99cdbfbd8e2eaef22d5db08c153bf75bc1689a82 /src/app/input/modal.rs | |
| parent | 67e48c0cc9aa1c18b743e3be54a69a4edab90680 (diff) | |
fix: seed workspace rename from live cwd
Diffstat (limited to 'src/app/input/modal.rs')
| -rw-r--r-- | src/app/input/modal.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/app/input/modal.rs b/src/app/input/modal.rs index 6821e64a..6cde98b5 100644 --- a/src/app/input/modal.rs +++ b/src/app/input/modal.rs @@ -280,10 +280,15 @@ pub(crate) fn handle_keybind_help_key(state: &mut AppState, key: KeyEvent) { } } -pub(super) fn open_rename_workspace(state: &mut AppState, ws_idx: usize) { +pub(super) fn open_rename_workspace( + state: &mut AppState, + terminal_runtimes: &crate::terminal::TerminalRuntimeRegistry, + ws_idx: usize, +) { state.selected = ws_idx; state.rename_pane_target = None; - state.name_input = state.workspaces[ws_idx].display_name(); + state.name_input = + state.workspaces[ws_idx].display_name_from(&state.terminals, terminal_runtimes); state.name_input_replace_on_type = false; state.mode = Mode::RenameWorkspace; } @@ -660,7 +665,7 @@ pub(super) fn apply_context_menu_action( ContextMenuKind::Workspace { ws_idx } | ContextMenuKind::GitWorkspace { ws_idx, .. }, Some("Rename"), ) => { - open_rename_workspace(state, ws_idx); + open_rename_workspace(state, terminal_runtimes, ws_idx); } ( ContextMenuKind::Workspace { ws_idx } | ContextMenuKind::GitWorkspace { ws_idx, .. }, |
