diff options
| author | Pitchfork-and-Torch <Pitchfork-and-Torch@users.noreply.github.com> | 2026-07-09 21:11:52 -0400 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-10 15:06:54 +0300 |
| commit | 4f7fcc48d1f760ab6057d0964f009c05b753456a (patch) | |
| tree | ee617c2d12d4c33c2c63a6a8048ab9e80a11d225 /src/workspace | |
| parent | c8850a2e3e284033142db0f8117fa5998c68bd59 (diff) | |
fix: follow foreground cwd for new terminals
refs #1245
Diffstat (limited to 'src/workspace')
| -rw-r--r-- | src/workspace/tab.rs | 10 |
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)) + } } |
