From 777a523aad9e2c93edf7ad5388cf76588030b944 Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Fri, 1 Apr 2022 12:22:56 -0400 Subject: [PATCH] fixes --- src/main.rs | 2 +- src/widgets.rs | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index bbe4f48..9b8c364 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,9 +4,9 @@ #[macro_use] extern crate static_assertions; +mod autocomplete_helper; mod consts; mod function; -mod hashmap_helper; mod math_app; mod misc; mod parsing; diff --git a/src/widgets.rs b/src/widgets.rs index bfc7050..2784cfa 100644 --- a/src/widgets.rs +++ b/src/widgets.rs @@ -49,7 +49,9 @@ impl AutoComplete { .lock_focus(true); if self.hint.is_none() { - return (string, func_edit.id(te_id).ui(ui).has_focus()); + let re = func_edit.id(te_id).ui(ui); + let return_string = (&new_string).to_string(); + return (return_string, re.has_focus()); } if let Some(single_hint) = self.hint.get_single() { @@ -137,6 +139,6 @@ impl AutoComplete { } return (new_string, true); } - (string, false) + (new_string, false) } }