Fix release notes appearing in project search (#32898)

Closes #28829

Release Notes:

- Fixed an issue where release notes would appear in project search
results when opened locally
This commit is contained in:
Ben Kunkle 2025-06-17 15:56:41 -05:00 committed by GitHub
parent a422345224
commit 0cda28f786
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 149 additions and 5 deletions

View file

@ -164,7 +164,7 @@ pub fn init(cx: &mut App) {
.detach();
}
fn is_contains_uppercase(str: &str) -> bool {
fn contains_uppercase(str: &str) -> bool {
str.chars().any(|c| c.is_uppercase())
}
@ -767,7 +767,7 @@ impl ProjectSearchView {
let query = this.search_query_text(cx);
if !query.is_empty()
&& this.search_options.contains(SearchOptions::CASE_SENSITIVE)
!= is_contains_uppercase(&query)
!= contains_uppercase(&query)
{
this.toggle_search_option(SearchOptions::CASE_SENSITIVE, cx);
}
@ -1323,7 +1323,7 @@ impl ProjectSearchView {
if EditorSettings::get_global(cx).use_smartcase_search
&& !query.is_empty()
&& self.search_options.contains(SearchOptions::CASE_SENSITIVE)
!= is_contains_uppercase(query)
!= contains_uppercase(query)
{
self.toggle_search_option(SearchOptions::CASE_SENSITIVE, cx)
}