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 Orual
parent 0155488955
commit c59d2dcc6d
No known key found for this signature in database

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| {