Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
project search: Do not bail on search when a binary file is encountered (#23775)
Piotr Osiewiczb74a2739347a
diff --git a/crates/project/src/worktree_store.rs b/crates/project/src/worktree_store.rsindex 01bd67d6fbd..49f6c9070d6 100644--- a/crates/project/src/worktree_store.rs+++ b/crates/project/src/worktree_store.rs@@ -1026,9 +1026,10 @@ impl WorktreeStore {{// Before attempting to match the file content, throw away files that have invalid UTF-8 sequences early on;// That way we can still match files in a streaming fashion without having look at "obviously binary" files.- return Err(anyhow!(+ log::debug!("Invalid UTF-8 sequence in file {abs_path:?} at byte position {starting_position}"- ));+ );+ continue;}if query.detect(file).unwrap_or(false) {