Files
oak-gpui/crates
Ngonidzashe Mangudya 68e6d55596 terminal: Fix terminal split pane opening in wrong directory (#39537)
## Problem
When splitting a terminal pane, the new pane opens in the root directory
(`/`) instead of preserving the current working directory of the
original terminal.

For example, when working in `/Users/modestnerd/Developer/Projects/zed`
(my pc) and splitting the terminal pane, the new pane would open in `/`
instead of staying in the current directory.

## Solution
Restructured the fallback logic in
`new_pane_with_cloned_active_terminal` (terminal_panel.rs:452-456) to
ensure `default_working_directory(workspace, cx)` is called as a
fallback even when a terminal view exists but its `working_directory()`
returns `None`.

The fix changes the nested `and_then` to use `or_else` for the fallback,
ensuring the working directory is always properly resolved before
entering the async block.

Release Notes:

- Fixed terminal split pane opening in wrong directory instead of
preserving the current working directory
2025-10-05 07:08:17 +00:00
..
2025-09-25 14:42:32 -07:00
2025-09-26 11:41:26 -04:00
2025-10-02 03:52:06 +00:00
2025-09-25 14:42:32 -07:00
2025-09-18 16:47:23 +00:00
2025-09-26 11:41:26 -04:00
2025-09-24 02:19:52 -06:00
2025-09-18 16:47:23 +00:00
2025-09-18 16:47:23 +00:00
2025-09-25 14:42:32 -07:00
2025-09-22 14:36:10 -07:00
2025-09-18 16:47:23 +00:00
2025-09-29 21:16:00 +00:00
2025-09-26 11:41:26 -04:00