Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
project_panel: Automatically open project panel when Rename or Duplicate is triggered from workspace (#34988)
Smit Barmase31afda3c0c3e
diff --git a/crates/project_panel/src/project_panel.rs b/crates/project_panel/src/project_panel.rsindex 44f4e8985ad..b0073f294fa 100644--- a/crates/project_panel/src/project_panel.rs+++ b/crates/project_panel/src/project_panel.rs@@ -322,6 +322,7 @@ pub fn init(cx: &mut App) {});workspace.register_action(|workspace, action: &Rename, window, cx| {+ workspace.open_panel::<ProjectPanel>(window, cx);if let Some(panel) = workspace.panel::<ProjectPanel>(cx) {panel.update(cx, |panel, cx| {if let Some(first_marked) = panel.marked_entries.first() {@@ -335,6 +336,7 @@ pub fn init(cx: &mut App) {});workspace.register_action(|workspace, action: &Duplicate, window, cx| {+ workspace.open_panel::<ProjectPanel>(window, cx);if let Some(panel) = workspace.panel::<ProjectPanel>(cx) {panel.update(cx, |panel, cx| {panel.duplicate(action, window, cx);