Simplify focus method in text_editor

This commit is contained in:
Héctor Ramón Jiménez 2024-07-29 00:54:23 +02:00
parent 695721e120
commit 6734d18359
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

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