Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Return "open in new window" as default in recent projects (#8798)
Jason Lee538298378a35
diff --git a/crates/recent_projects/src/recent_projects.rs b/crates/recent_projects/src/recent_projects.rsindex 14a8ae7e9c9..f2d0ad0f848 100644--- a/crates/recent_projects/src/recent_projects.rs+++ b/crates/recent_projects/src/recent_projects.rs@@ -16,10 +16,14 @@ use workspace::{ModalView, Workspace, WorkspaceId, WorkspaceLocation, WORKSPACE_#[derive(PartialEq, Clone, Deserialize, Default)]pub struct OpenRecent {- #[serde(default)]+ #[serde(default = "default_create_new_window")]pub create_new_window: bool,}+fn default_create_new_window() -> bool {+ true+}+gpui::impl_actions!(projects, [OpenRecent]);pub fn init(cx: &mut AppContext) {@@ -269,7 +273,7 @@ impl PickerDelegate for RecentProjectsDelegate {workspace.update(&mut cx, |workspace, cx| {workspace.open_workspace_for_paths(- replace_current_window,+ true,candidate_paths,cx,)@@ -280,11 +284,7 @@ impl PickerDelegate for RecentProjectsDelegate {}})} else {- workspace.open_workspace_for_paths(- replace_current_window,- candidate_paths,- cx,- )+ workspace.open_workspace_for_paths(false, candidate_paths, cx)}} else {Task::ready(Ok(()))diff --git a/crates/zed/src/app_menus.rs b/crates/zed/src/app_menus.rsindex 43b1d45c150..12a88ed2169 100644--- a/crates/zed/src/app_menus.rs+++ b/crates/zed/src/app_menus.rs@@ -40,7 +40,7 @@ pub fn app_menus() -> Vec<Menu<'static>> {MenuItem::action("Open Recent...",recent_projects::OpenRecent {- create_new_window: false,+ create_new_window: true,},),MenuItem::separator(),