mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-14 14:11:34 +00: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
1 changed files with 2 additions and 1 deletions
|
@ -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 a new issue