diff options
Diffstat (limited to 'src/app/api/panes.rs')
| -rw-r--r-- | src/app/api/panes.rs | 5 |
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; |
