aboutsummaryrefslogtreecommitdiff
path: root/src/app/api/panes.rs
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-05-23 00:32:46 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-05-23 00:32:46 +0300
commit3de6ea799965a7d2aad0f7db2f23f54cd24cb039 (patch)
treec9233a7f3d432aed7761c9db9c0072fee4ff5de2 /src/app/api/panes.rs
parent0fec1199671becba511e03d98a4921e375a46fe3 (diff)
feat: configure new terminal cwd
Diffstat (limited to 'src/app/api/panes.rs')
-rw-r--r--src/app/api/panes.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/app/api/panes.rs b/src/app/api/panes.rs
index 2b1741d9..e0df6845 100644
--- a/src/app/api/panes.rs
+++ b/src/app/api/panes.rs
@@ -21,14 +21,15 @@ impl App {
};
let (rows, cols) = self.state.estimate_pane_size();
let split_cwd = params.cwd.map(std::path::PathBuf::from).or_else(|| {
- self.state.workspaces.get(ws_idx).and_then(|ws| {
+ 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,
)
- })
+ });
+ Some(self.resolve_new_terminal_cwd(follow_cwd))
});
let default_shell = self.state.default_shell.clone();
let scrollback_limit_bytes = self.state.pane_scrollback_limit_bytes;