Fix a bug where directories were not matching in the fuzzy matcher, when query contains the worktree root name (#16242)

Release Notes:

- N/A

Co-authored-by: Max <max@zed.dev>
This commit is contained in:
Mikayla Maki 2024-08-14 12:43:00 -07:00 committed by GitHub
parent e8bae839ed
commit 271e774713
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 19 additions and 21 deletions

View file

@ -1612,7 +1612,7 @@ impl ProjectPanel {
new_entry_kind = if edit_state.is_dir {
EntryKind::Dir
} else {
EntryKind::File(Default::default())
EntryKind::File
};
}
}
@ -1652,6 +1652,7 @@ impl ProjectPanel {
git_status: entry.git_status,
canonical_path: entry.canonical_path.clone(),
is_symlink: entry.is_symlink,
char_bag: entry.char_bag,
});
}
if expanded_dir_ids.binary_search(&entry.id).is_err()
@ -1875,7 +1876,7 @@ impl ProjectPanel {
let status = git_status_setting.then(|| entry.git_status).flatten();
let is_expanded = expanded_entry_ids.binary_search(&entry.id).is_ok();
let icon = match entry.kind {
EntryKind::File(_) => {
EntryKind::File => {
if show_file_icons {
FileIcons::get_icon(&entry.path, cx)
} else {