Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Support uppercase extensions in image preview (#19304)

Peter Tripp5ad392035e5b
diff --git a/crates/image_viewer/src/image_viewer.rs b/crates/image_viewer/src/image_viewer.rs
index a7ff1e732db..5691119dea9 100644
--- a/crates/image_viewer/src/image_viewer.rs
+++ b/crates/image_viewer/src/image_viewer.rs
@@ -36,7 +36,9 @@ impl project::Item for ImageItem {
.path
.extension()
.and_then(OsStr::to_str)
+ .map(str::to_lowercase)
.unwrap_or_default();
+ let ext = ext.as_str();
// 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