Ensure we drop the last pane item

Previously, we weren't updating the toolbar's active item when emptying out a pane. This enhances an integration test to ensure that we don't hold references to any editors or buffers once we close everything.
This commit is contained in:
Nathan Sobo 2022-04-05 13:02:17 -06:00
parent 41a27e6925
commit 4f4364d510
3 changed files with 78 additions and 12 deletions

View file

@ -580,6 +580,7 @@ impl Pane {
let item = pane.items.remove(item_ix);
if pane.items.is_empty() {
item.deactivated(cx);
pane.update_toolbar(cx);
cx.emit(Event::Remove);
}