aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_db/src/items_locator.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide_db/src/items_locator.rs')
-rw-r--r--crates/ide_db/src/items_locator.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/crates/ide_db/src/items_locator.rs b/crates/ide_db/src/items_locator.rs
index 518cddd74..b9d5852e2 100644
--- a/crates/ide_db/src/items_locator.rs
+++ b/crates/ide_db/src/items_locator.rs
@@ -62,6 +62,8 @@ pub fn items_with_name(
62 (local_query, external_query) 62 (local_query, external_query)
63 } 63 }
64 NameToImport::Fuzzy(fuzzy_search_string) => { 64 NameToImport::Fuzzy(fuzzy_search_string) => {
65 let mut local_query = symbol_index::Query::new(fuzzy_search_string.clone());
66
65 let mut external_query = import_map::Query::new(fuzzy_search_string.clone()) 67 let mut external_query = import_map::Query::new(fuzzy_search_string.clone())
66 .search_mode(import_map::SearchMode::Fuzzy) 68 .search_mode(import_map::SearchMode::Fuzzy)
67 .name_only(); 69 .name_only();
@@ -75,7 +77,12 @@ pub fn items_with_name(
75 } 77 }
76 } 78 }
77 79
78 (symbol_index::Query::new(fuzzy_search_string), external_query) 80 if fuzzy_search_string.to_lowercase() != fuzzy_search_string {
81 local_query.case_sensitive();
82 external_query = external_query.case_sensitive();
83 }
84
85 (local_query, external_query)
79 } 86 }
80 }; 87 };
81 88