From a5a1981b3ed6cb3b02f6aa6f52e446a7d8122e75 Mon Sep 17 00:00:00 2001 From: skylar taylor-barrick Date: Mon, 9 Nov 2026 15:20:06 +0100 Subject: [PATCH] Actions palette: put each search doc comment back on its function search_text had grown a second doc line under matches's, so the sentence about the query sat above a function that takes none. search_text now says what it reads and matches keeps its own. --- crates/ui-egui/src/menus/palette.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/ui-egui/src/menus/palette.rs b/crates/ui-egui/src/menus/palette.rs index 7b3697660..8d25a8583 100644 --- a/crates/ui-egui/src/menus/palette.rs +++ b/crates/ui-egui/src/menus/palette.rs @@ -241,9 +241,8 @@ fn draw_row(ui: &mut Ui, t: &Tokens, row: &ActionRow, highlighted: bool) -> egui resp } -/// Whether `label` (or `extra`) matches the query, in any case. -/// What a search reads besides the label in the UI's language: the English label, the id, and a -/// name the feature had before it was renamed ([`figcraft_engine::catalog::SEARCH_ALIASES`]). +/// The text a search reads besides the label in the UI's language: the English label, the id, and +/// a name the feature had before it was renamed ([`figcraft_engine::catalog::SEARCH_ALIASES`]). fn search_text(english: &str, id: &str) -> String { let mut text = format!("{english} {id}"); for (alias_id, alias) in figcraft_engine::catalog::SEARCH_ALIASES { @@ -255,6 +254,7 @@ fn search_text(english: &str, id: &str) -> String { text } +/// Whether `label` (or `extra`) matches the query, in any case. fn matches(q: &str, label: &str, extra: &str) -> bool { q.is_empty() || label.to_lowercase().contains(q) || extra.to_lowercase().contains(q) }