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
This commit is contained in:
parent
09a4cfd307
commit
a364a13458
1 changed files with 1 additions and 1 deletions
|
@ -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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue