Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

sidebar: Don't do anything on cmd-click if project is already active (#55190)

Danilo Lealc70c5da3ec7c
diff --git a/crates/sidebar/src/sidebar.rs b/crates/sidebar/src/sidebar.rs
index aa07b8c3eef..12df8a7f1cb 100644
--- a/crates/sidebar/src/sidebar.rs
+++ b/crates/sidebar/src/sidebar.rs
@@ -4182,6 +4182,9 @@ impl Sidebar {
.and_then(|mw| mw.read(cx).last_active_workspace_for_group(key, cx))
.or_else(|| self.workspace_for_group(key, cx));
if let Some(workspace) = workspace {
+ if self.is_active_workspace(&workspace, cx) {
+ return;
+ }
self.activate_workspace(&workspace, window, cx);
} else {
self.open_workspace_for_group(key, window, cx);