Improve file finder by ignoring spaces in query (#7068)

Release Notes:

- Changed file finder to ignore spaces in queries ([#5324
](https://github.com/zed-industries/zed/issues/5324)).


![image](https://github.com/zed-industries/zed/assets/7274458/14f3d511-129d-4e73-b9d3-12ce1aaa892f)

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
This commit is contained in:
Ben Hamment 2024-01-31 19:18:21 +00:00 committed by GitHub
parent 135bca262c
commit 5333eff0e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 0 deletions

View File

@ -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);

View File

@ -53,6 +53,7 @@ async fn test_matching_paths(cx: &mut TestAppContext) {
" bandana ",
" ndan ",
" band ",
"a bandana",
] {
picker
.update(cx, |picker, cx| {