Forget last pane's leader when such pane is removed

This is just a memory optimization and doesn't cause any observable
change in behavior.
This commit is contained in:
Antonio Scandurra 2022-03-22 11:06:52 +01:00
parent 5dc36260e5
commit ffaf409a31

View File

@ -1203,6 +1203,7 @@ impl Workspace {
self.panes.retain(|p| p != &pane);
self.activate_pane(self.panes.last().unwrap().clone(), cx);
self.unfollow(&pane, cx);
self.last_leaders_by_pane.remove(&pane.downgrade());
cx.notify();
}
}