mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-27 02:48:34 +00:00
Restore shutdown behavior
This commit is contained in:
parent
230b894871
commit
704ab33f72
2 changed files with 5 additions and 5 deletions
|
@ -4067,10 +4067,10 @@ pub fn restart(_: &Restart, cx: &mut AppContext) {
|
||||||
|
|
||||||
// If the user cancels any save prompt, then keep the app open.
|
// If the user cancels any save prompt, then keep the app open.
|
||||||
for window in workspace_windows {
|
for window in workspace_windows {
|
||||||
if let Some(close) = window.update_root(&mut cx, |workspace, cx| {
|
if let Some(should_close) = window.update_root(&mut cx, |workspace, cx| {
|
||||||
workspace.prepare_to_close(true, cx)
|
workspace.prepare_to_close(true, cx)
|
||||||
}) {
|
}) {
|
||||||
if !close.await? {
|
if !should_close.await? {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -433,10 +433,10 @@ fn quit(_: &Quit, cx: &mut gpui::AppContext) {
|
||||||
|
|
||||||
// If the user cancels any save prompt, then keep the app open.
|
// If the user cancels any save prompt, then keep the app open.
|
||||||
for window in workspace_windows {
|
for window in workspace_windows {
|
||||||
if let Some(close) = window.update_root(&mut cx, |workspace, cx| {
|
if let Some(should_close) = window.update_root(&mut cx, |workspace, cx| {
|
||||||
workspace.prepare_to_close(false, cx)
|
workspace.prepare_to_close(true, cx)
|
||||||
}) {
|
}) {
|
||||||
if close.await? {
|
if !should_close.await? {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue