mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-09 21:26:14 +03:00
Only enable smart case if the query contains an uppercase character
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
parent
f934370e7f
commit
b52db22544
@ -63,6 +63,7 @@ impl<T> Outline<T> {
|
||||
pub async fn search(&self, query: &str, executor: Arc<Background>) -> Vec<StringMatch> {
|
||||
let query = query.trim_start();
|
||||
let is_path_query = query.contains(' ');
|
||||
let smart_case = query.chars().any(|c| c.is_uppercase());
|
||||
let mut matches = fuzzy::match_strings(
|
||||
if is_path_query {
|
||||
&self.path_candidates
|
||||
@ -70,7 +71,7 @@ impl<T> Outline<T> {
|
||||
&self.candidates
|
||||
},
|
||||
query,
|
||||
true,
|
||||
smart_case,
|
||||
100,
|
||||
&Default::default(),
|
||||
executor.clone(),
|
||||
|
Loading…
Reference in New Issue
Block a user