diff options
Diffstat (limited to 'src/workspace/tab.rs')
| -rw-r--r-- | src/workspace/tab.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/workspace/tab.rs b/src/workspace/tab.rs index d5ebe00f..100e67d0 100644 --- a/src/workspace/tab.rs +++ b/src/workspace/tab.rs @@ -405,4 +405,15 @@ impl Tab { .map(|terminal| terminal.cwd.clone()) }) } + + pub fn foreground_cwd_for_pane( + &self, + pane_id: PaneId, + terminal_runtimes: &TerminalRuntimeRegistry, + ) -> Option<PathBuf> { + let terminal_id = self.terminal_id(pane_id)?; + terminal_runtimes + .get(terminal_id) + .and_then(|rt| rt.foreground_cwd()) + } } |
