Restructure item closing to take the Workspace instead of the Pane

This commit is contained in:
Antonio Scandurra 2022-04-05 19:10:44 +02:00
parent 939def42e3
commit cac0dddb1b
3 changed files with 113 additions and 102 deletions

View file

@ -878,11 +878,10 @@ mod tests {
.update(cx, |workspace, cx| {
let editor3_id = editor3.id();
drop(editor3);
workspace
.active_pane()
.update(cx, |pane, cx| pane.close_item(editor3_id, cx))
Pane::close_item(workspace, workspace.active_pane().clone(), editor3_id, cx)
})
.await;
.await
.unwrap();
workspace
.update(cx, |w, cx| Pane::go_forward(w, None, cx))
.await;
@ -896,11 +895,10 @@ mod tests {
.update(cx, |workspace, cx| {
let editor2_id = editor2.id();
drop(editor2);
workspace
.active_pane()
.update(cx, |pane, cx| pane.close_item(editor2_id, cx))
Pane::close_item(workspace, workspace.active_pane().clone(), editor2_id, cx)
})
.await;
.await
.unwrap();
app_state
.fs
.as_fake()