Skip to content

Commit

Permalink
Update builder.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
rustbasic authored May 22, 2024
1 parent a68be53 commit 7c454a3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/egui/src/widgets/text_edit/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1032,6 +1032,8 @@ fn events(
// ----------------------------------------------------------------------------

fn ime_enabled_filter_events(events: &mut Vec<Event>) {
// Remove key events which cause problems while 'IME' is being used.
// See https://github.com/emilk/egui/pull/4509
events.retain(|event| {
!matches!(
event,
Expand All @@ -1044,7 +1046,7 @@ fn ime_enabled_filter_events(events: &mut Vec<Event>) {
});
}

fn ime_front_events(events: &mut Vec<Event>) {
fn ime_front_events(events: &mut [Event]) {
events.sort_by(|a, b| match (a, b) {
(Event::Ime(_), Event::Ime(_)) => std::cmp::Ordering::Equal,
(Event::Ime(_), _) => std::cmp::Ordering::Less,
Expand Down

0 comments on commit 7c454a3

Please sign in to comment.