Add "Close Window" command

This commit is contained in:
Max Brunsfeld 2022-05-20 16:53:03 -07:00
parent b08cad9ef5
commit 21206800bc
4 changed files with 38 additions and 0 deletions

View file

@ -482,6 +482,14 @@ impl Pane {
})
}
pub fn close_all_items(
workspace: &mut Workspace,
pane: ViewHandle<Pane>,
cx: &mut ViewContext<Workspace>,
) -> Task<Result<()>> {
Self::close_items(workspace, pane, cx, |_| true)
}
pub fn close_items(
workspace: &mut Workspace,
pane: ViewHandle<Pane>,