From 9e302984ccb13a65e3e504fa7692b223f546ff84 Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Fri, 29 May 2026 20:38:55 +0300 Subject: feat: expose foreground cwd in pane info refs #345 --- src/workspace/tab.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/workspace') 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 { + let terminal_id = self.terminal_id(pane_id)?; + terminal_runtimes + .get(terminal_id) + .and_then(|rt| rt.foreground_cwd()) + } } -- cgit v1.2.3