1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 13:20:05 -04:00

Fix: problems pointed out by Copilot

https://github.com/emilk/egui/pull/8083#pullrequestreview-4364725473
This commit is contained in:
umajho
2026-05-27 07:22:13 +08:00
parent b1335f6c44
commit c8439f3150
4 changed files with 44 additions and 18 deletions

View File

@@ -105,19 +105,17 @@ impl TextAgent {
active_range_chars,
});
runner.input.raw.events.push(event);
runner.needs_repaint.repaint_asap();
} else {
if text.is_empty() {
return;
}
if !event.is_composing() {
input.set_value("");
let event = egui::Event::Text(text);
runner.input.raw.events.push(event);
runner.needs_repaint.repaint_asap();
}
input.set_value("");
let event = egui::Event::Text(text);
runner.input.raw.events.push(event);
}
runner.needs_repaint.repaint_asap();
}
};