diff options
author | 2024-07-29 00:54:23 +0200 | |
---|---|---|
committer | 2024-07-29 00:54:23 +0200 | |
commit | 6734d183594ebf89b8e6c030ea69d53ecb6b72db (patch) | |
tree | fa16d5560ba2eb92d37ae11905b87ce0308cdc56 /widget | |
parent | 695721e120a173817125265a35afbc49813db716 (diff) | |
download | iced-6734d183594ebf89b8e6c030ea69d53ecb6b72db.tar.gz iced-6734d183594ebf89b8e6c030ea69d53ecb6b72db.tar.bz2 iced-6734d183594ebf89b8e6c030ea69d53ecb6b72db.zip |
Simplify `focus` method in `text_editor`
Diffstat (limited to 'widget')
-rw-r--r-- | widget/src/text_editor.rs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/widget/src/text_editor.rs b/widget/src/text_editor.rs index bc391be3..a264ba06 100644 --- a/widget/src/text_editor.rs +++ b/widget/src/text_editor.rs @@ -424,13 +424,7 @@ impl<Highlighter: text::Highlighter> operation::Focusable } fn focus(&mut self) { - let now = Instant::now(); - - self.focus = Some(Focus { - updated_at: now, - now, - is_window_focused: true, - }); + self.focus = Some(Focus::now()); } fn unfocus(&mut self) { |