aboutsummaryrefslogtreecommitdiff
path: root/src/app/api/panes.rs
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-07-02 02:20:40 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-07-02 02:20:40 +0300
commit48d58648aefcc59964a99be9c23778fe69346663 (patch)
treecd982894e474bfd8b8ce7fbcb81d6487d7a7a064 /src/app/api/panes.rs
parenta9111cbab2a7550c7e84ec94c8b388de9a44daa3 (diff)
fix: follow cached cwd for new tabs
refs #912
Diffstat (limited to 'src/app/api/panes.rs')
-rw-r--r--src/app/api/panes.rs9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/app/api/panes.rs b/src/app/api/panes.rs
index 5723be1e..a0428b27 100644
--- a/src/app/api/panes.rs
+++ b/src/app/api/panes.rs
@@ -51,14 +51,7 @@ impl App {
};
let (rows, cols) = self.state.estimate_pane_size();
let split_cwd = params.cwd.map(std::path::PathBuf::from).or_else(|| {
- let follow_cwd = self.state.workspaces.get(ws_idx).and_then(|ws| {
- let tab_idx = ws.find_tab_index_for_pane(target_pane_id)?;
- ws.tabs.get(tab_idx)?.cwd_for_pane(
- target_pane_id,
- &self.state.terminals,
- &self.terminal_runtimes,
- )
- });
+ let follow_cwd = self.cwd_for_pane_in_workspace(ws_idx, target_pane_id);
Some(self.resolve_new_terminal_cwd(follow_cwd))
});
let default_shell = self.state.default_shell.clone();