search: Fix project search query flickering (#36470)

Release Notes:

- N/A

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
This commit is contained in:
Lukas Wirth 2025-08-19 12:16:49 +02:00 committed by GitHub
parent 0ea0d466d2
commit 5df9c7c1c2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1925,13 +1925,15 @@ impl Render for ProjectSearchBar {
let limit_reached = project_search.limit_reached;
let color_override = match (
&project_search.pending_search,
project_search.no_results,
&project_search.active_query,
&project_search.last_search_query_text,
) {
(Some(true), Some(q), Some(p)) if q.as_str() == p => Some(Color::Error),
(None, Some(true), Some(q), Some(p)) if q.as_str() == p => Some(Color::Error),
_ => None,
};
let match_text = search
.active_match_index
.and_then(|index| {