From 6efeba38ddf356af430146ad030e577e99c2140a Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Mon, 4 Apr 2022 09:33:56 -0400 Subject: [PATCH] add comment --- src/widgets.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/widgets.rs b/src/widgets.rs index 8bc1716..4b6ba17 100644 --- a/src/widgets.rs +++ b/src/widgets.rs @@ -45,7 +45,7 @@ impl AutoComplete { self.changed(string.clone()); let mut func_edit = egui::TextEdit::singleline(&mut new_string) - .hint_forward(true) + .hint_forward(true) // Make the hint appear after the last text in the textbox .lock_focus(true); if self.hint.is_none() { @@ -92,6 +92,7 @@ impl AutoComplete { self.i = i as usize; + // Doesn't need to have a number in id as there should only be 1 autocomplete popup in entire gui let popup_id = ui.make_persistent_id("autocomplete_popup"); let mut clicked = false; @@ -137,8 +138,7 @@ impl AutoComplete { }))); TextEdit::store_state(ui.ctx(), te_id, state); } - return (new_string, true); } - (new_string, false) + (new_string, func_edit_focus) } }