Skip to content

Commit

Permalink
Fix deadlock during text selection
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Jan 19, 2024
1 parent f034f6d commit d319489
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/egui/src/text_selection/label_text_selection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ fn process_selection_key_events(
cursor_range: &mut CursorRange,
) {
let mut copy_text = None;
let os = ctx.os();

ctx.input(|i| {
// NOTE: we have a lock on ui/ctx here,
Expand All @@ -139,7 +140,7 @@ fn process_selection_key_events(
}

event => {
cursor_range.on_event(ctx.os(), event, galley, widget_id);
cursor_range.on_event(os, event, galley, widget_id);
}
}
}
Expand Down

0 comments on commit d319489

Please sign in to comment.