Improve file finder by ignoring spaces in query (#7068)
Ben Hamment
and
Marshall Bowers
created
Release Notes:
- Changed file finder to ignore spaces in queries ([#5324
](https://github.com/zed-industries/zed/issues/5324)).

---------
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Change summary
crates/file_finder/src/file_finder.rs | 1 +
crates/file_finder/src/file_finder_tests.rs | 1 +
2 files changed, 2 insertions(+)
Detailed changes
@@ -666,6 +666,7 @@ impl PickerDelegate for FileFinderDelegate {
raw_query: String,
cx: &mut ViewContext<Picker<Self>>,
) -> Task<()> {
+ let raw_query = raw_query.replace(" ", "");
let raw_query = raw_query.trim();
if raw_query.is_empty() {
let project = self.project.read(cx);
@@ -53,6 +53,7 @@ async fn test_matching_paths(cx: &mut TestAppContext) {
" bandana ",
" ndan ",
" band ",
+ "a bandana",
] {
picker
.update(cx, |picker, cx| {