diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-29 20:38:55 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-29 20:38:55 +0300 |
| commit | 9e302984ccb13a65e3e504fa7692b223f546ff84 (patch) | |
| tree | 52808a27bd82c05f55117ad129137fe3ef46a8cb /src/workspace | |
| parent | 77242943ba65a80cbc1180258dd64f06635233f9 (diff) | |
feat: expose foreground cwd in pane info
refs #345
Diffstat (limited to 'src/workspace')
| -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()) + } } |
