ZIm/crates/workspace/src
smit 5dc3c237eb
workspace: Do not reuse window for sub directory (only for root directory and sub files) (#24560)
Closes #10232

Context:

We have three ways to open files or dirs in Zed: `zed`, `zed --new`, and
`zed --add`. `--new` forces the project to open in a new window, while
`--add` forces it to open in an existing window (even if the dir isn’t a
subdir of an existing project or the file isn’t part of it).

Using just `zed` tries to open it in an existing window based on similar
logic of `--add`, but if no related project is found the dir, opens in a
new window.

Problem:

Right now, subdirs that are part of an existing project open in the
existing window when using `zed`. By default, subdirs should open in a
new window instead. If someone wants to open it in the existing window,
they can explicitly use `--add`. After this PR, only root dir and files
will focus on existing window, when `zed ` is used.

Fix:

For the `zed` case, we’ve filtered out subdirs in the logic that assigns
them to an existing window.

Release Notes:

- Fixed an issue where subdirectories of an already opened project, when
opened via the terminal, would open in the existing project instead of a
new window.
2025-02-13 03:37:39 +05:30
..
persistence Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
shared_screen Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
dock.rs status_bar: Only show divider for left dock (#24178) 2025-02-04 08:02:29 +00:00
item.rs Rename model based variable names to entity (#24198) 2025-02-04 10:24:35 -08:00
modal_layer.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
notifications.rs Settings/keymap backup path next to files + update notification messages (#24517) 2025-02-09 16:51:37 -07:00
pane.rs Fix hover tooltips appearing after related element is pressed (#24540) 2025-02-10 00:16:12 +00:00
pane_group.rs Migrate keymap and settings + edit predictions rename (#23834) 2025-02-07 21:17:07 +05:30
persistence.rs Refactor to use SharedString in more places (#23813) 2025-01-28 19:04:21 -05:00
searchable.rs Allow buffer search in project search (#23819) 2025-01-31 00:13:46 -07:00
shared_screen.rs Simplify livekit config so that cargo check Just Works (#21661) 2024-12-06 13:50:59 -08:00
status_bar.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
tasks.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
theme_preview.rs component: Add component and component_preview crates to power UI components (#24456) 2025-02-09 13:25:03 -05:00
toolbar.rs Allow buffer search in project search (#23819) 2025-01-31 00:13:46 -07:00
workspace.rs workspace: Do not reuse window for sub directory (only for root directory and sub files) (#24560) 2025-02-13 03:37:39 +05:30
workspace_settings.rs pane: Add settings to hide the tab bar buttons (#23752) 2025-01-27 21:36:33 -03:00