Skip to content

Commit

Permalink
Simplify focus method in text_editor
Browse files Browse the repository at this point in the history
  • Loading branch information
hecrj committed Jul 28, 2024
1 parent 695721e commit 6734d18
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions widget/src/text_editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 6734d18

Please sign in to comment.