aboutsummaryrefslogtreecommitdiff
path: root/src/workspace
diff options
context:
space:
mode:
Diffstat (limited to 'src/workspace')
-rw-r--r--src/workspace/tab.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/workspace/tab.rs b/src/workspace/tab.rs
index d1b39ff4..ab9829d0 100644
--- a/src/workspace/tab.rs
+++ b/src/workspace/tab.rs
@@ -568,4 +568,14 @@ impl Tab {
.get(terminal_id)
.and_then(|rt| rt.foreground_cwd())
}
+
+ pub fn follow_cwd_for_pane(
+ &self,
+ pane_id: PaneId,
+ terminals: &HashMap<TerminalId, TerminalState>,
+ terminal_runtimes: &TerminalRuntimeRegistry,
+ ) -> Option<PathBuf> {
+ self.foreground_cwd_for_pane(pane_id, terminal_runtimes)
+ .or_else(|| self.cwd_for_pane(pane_id, terminals, terminal_runtimes))
+ }
}