Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fix handling of `--diff` flag (#33094)
Max Brunsfelda7bbbc0552dd
diff --git a/crates/zed/src/zed/open_listener.rs b/crates/zed/src/zed/open_listener.rsindex 0e9d0c51c9b..0fb08d1be57 100644--- a/crates/zed/src/zed/open_listener.rs+++ b/crates/zed/src/zed/open_listener.rs@@ -296,7 +296,7 @@ pub async fn handle_cli_connection(env,user_data_dir: _,} => {- if !urls.is_empty() || !diff_paths.is_empty() {+ if !urls.is_empty() {cx.update(|cx| {match OpenRequest::parse(RawOpenRequest { urls, diff_paths }, cx) {Ok(open_request) => {@@ -346,7 +346,7 @@ async fn open_workspaces(env: Option<collections::HashMap<String, String>>,cx: &mut AsyncApp,) -> Result<()> {- let grouped_locations = if paths.is_empty() {+ let grouped_locations = if paths.is_empty() && diff_paths.is_empty() {// If no paths are provided, restore from previous workspaces unless a new workspace is requested with -nif open_new_workspace == Some(true) {Vec::new()