From 31afda3c0c3ea326cbec7e3d99a0d334ad7d638b Mon Sep 17 00:00:00 2001 From: Smit Barmase Date: Thu, 24 Jul 2025 05:26:12 +0530 Subject: [PATCH] project_panel: Automatically open project panel when Rename or Duplicate is triggered from workspace (#34988) In project panel, `rename` and `duplicate` action further needs user input for editing, so if panel is closed we should open it. Release Notes: - Fixed project panel not opening when `project panel: rename` and `project panel: duplicate` actions are triggered from workspace. --- crates/project_panel/src/project_panel.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/project_panel/src/project_panel.rs b/crates/project_panel/src/project_panel.rs index 44f4e8985a..b0073f294f 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::(window, cx); if let Some(panel) = workspace.panel::(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::(window, cx); if let Some(panel) = workspace.panel::(cx) { panel.update(cx, |panel, cx| { panel.duplicate(action, window, cx);