Fix focus bug with new docks

co-authored-by: max <max@zed.dev>
This commit is contained in:
Mikayla Maki 2023-05-30 15:40:30 -07:00
parent 5e4a9abd09
commit e80ab5f096
No known key found for this signature in database
2 changed files with 5 additions and 16 deletions

View file

@ -1945,11 +1945,7 @@ impl Workspace {
fn handle_pane_focused(&mut self, pane: ViewHandle<Pane>, cx: &mut ViewContext<Self>) {
if self.active_pane != pane {
self.active_pane
.update(cx, |pane, cx| pane.set_active(false, cx));
self.active_pane = pane.clone();
self.active_pane
.update(cx, |pane, cx| pane.set_active(true, cx));
self.status_bar.update(cx, |status_bar, cx| {
status_bar.set_active_pane(&self.active_pane, cx);
});
@ -2868,7 +2864,7 @@ impl Workspace {
})
})
.collect::<Vec<_>>(),
pane.is_active(),
pane.has_focus(),
)
};