Bind CloseWindow and Open actions on workspace
Co-Authored-By: Max <max@zed.dev>
This commit is contained in:
parent
6f7995c150
commit
0edd89a92f
2 changed files with 85 additions and 88 deletions
|
@ -168,9 +168,7 @@ pub fn initialize_workspace(app_state: Arc<AppState>, cx: &mut AppContext) {
|
|||
cx.on_window_should_close(move |cx| {
|
||||
handle
|
||||
.update(cx, |workspace, cx| {
|
||||
if let Some(task) = workspace.close(&Default::default(), cx) {
|
||||
task.detach_and_log_err(cx);
|
||||
}
|
||||
workspace.close_window(&Default::default(), cx);
|
||||
false
|
||||
})
|
||||
.unwrap_or(true)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue