Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Restore shutdown behavior
Kirill Bulatov704ab33f7266
diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rsindex 2f884b0ceb3..1612aadc2f5 100644--- a/crates/workspace/src/workspace.rs+++ b/crates/workspace/src/workspace.rs@@ -4067,10 +4067,10 @@ pub fn restart(_: &Restart, cx: &mut AppContext) {// If the user cancels any save prompt, then keep the app open.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)}) {- if !close.await? {+ if !should_close.await? {return Ok(());}}diff --git a/crates/zed/src/zed.rs b/crates/zed/src/zed.rsindex 099d837ba4c..f27a6f075d2 100644--- a/crates/zed/src/zed.rs+++ b/crates/zed/src/zed.rs@@ -433,10 +433,10 @@ fn quit(_: &Quit, cx: &mut gpui::AppContext) {// If the user cancels any save prompt, then keep the app open.for window in workspace_windows {- if let Some(close) = window.update_root(&mut cx, |workspace, cx| {- workspace.prepare_to_close(false, cx)+ if let Some(should_close) = window.update_root(&mut cx, |workspace, cx| {+ workspace.prepare_to_close(true, cx)}) {- if close.await? {+ if !should_close.await? {return Ok(());}}