From a364a134589167067d51899c8e69ef46e7c32dd2 Mon Sep 17 00:00:00 2001 From: Cristiano Pantea <132406087+crispantea@users.noreply.github.com> Date: Tue, 11 Mar 2025 22:52:55 +0000 Subject: [PATCH] Fix panel not resizing after external file deletion (#26378) Previously, when a file was deleted externally and the warning prompt was dismissed with "Close", the panel remained but was empty, leaving an unused split space. This happened because pane.remove_item(...) was being called with close_pane_if_empty set to false, preventing the panel from being removed even when it had no remaining items. This fix changes the third boolean parameter to true, ensuring that the panel is removed if it becomes empty, allowing the layout to properly resize. Closes #23904 Release Notes: - N/A --- crates/workspace/src/pane.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/workspace/src/pane.rs b/crates/workspace/src/pane.rs index 37299f24beebc8fecb9916520058836244d39a44..60fc97d97a39deb6527d278e4cd87143636f3226 100644 --- a/crates/workspace/src/pane.rs +++ b/crates/workspace/src/pane.rs @@ -1878,7 +1878,7 @@ impl Pane { } Ok(1) => { pane.update_in(cx, |pane, window, cx| { - pane.remove_item(item.item_id(), false, false, window, cx) + pane.remove_item(item.item_id(), false, true, window, cx) })?; } _ => return Ok(false),