Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Do not show image viewer for SVGs (#10435)
Kyle Kelleyedb1ea24330d
diff --git a/crates/image_viewer/src/image_viewer.rs b/crates/image_viewer/src/image_viewer.rsindex 86383163a7f..22dc3fb5d6a 100644--- a/crates/image_viewer/src/image_viewer.rs+++ b/crates/image_viewer/src/image_viewer.rs@@ -37,7 +37,9 @@ impl project::Item for ImageItem {.and_then(OsStr::to_str).unwrap_or_default();- if Img::extensions().contains(&ext) {+ // Only open the item if it's a binary image (no SVGs, etc.)+ // Since we do not have a way to toggle to an editor+ if Img::extensions().contains(&ext) && !ext.contains("svg") {Some(cx.spawn(|mut cx| async move {let abs_path = project.read_with(&cx, |project, cx| project.absolute_path(&path, cx))?