Avoid workspace use while leased
This commit is contained in:
parent
0390fb1449
commit
5840750b3d
1 changed files with 7 additions and 7 deletions
|
@ -1452,15 +1452,15 @@ impl Pane {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn update_status_bar(&mut self, cx: &mut ViewContext<Self>) {
|
fn update_status_bar(&mut self, cx: &mut ViewContext<Self>) {
|
||||||
let Ok(status_bar) = self
|
let workspace = self.workspace.clone();
|
||||||
.workspace
|
|
||||||
.update(cx, |workspace, _| workspace.status_bar.clone())
|
|
||||||
else {
|
|
||||||
return;
|
|
||||||
};
|
|
||||||
|
|
||||||
let pane = cx.view().clone();
|
let pane = cx.view().clone();
|
||||||
|
|
||||||
cx.window_context().defer(move |cx| {
|
cx.window_context().defer(move |cx| {
|
||||||
|
let Ok(status_bar) = workspace.update(cx, |workspace, _| workspace.status_bar.clone())
|
||||||
|
else {
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
|
||||||
status_bar.update(cx, move |status_bar, cx| {
|
status_bar.update(cx, move |status_bar, cx| {
|
||||||
status_bar.set_active_pane(&pane, cx);
|
status_bar.set_active_pane(&pane, cx);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue