mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 13:50:04 -04:00
Fix when a string containing CRLF is pasted from the clipboard (#826)
This commit is contained in:
@@ -490,7 +490,9 @@ impl State {
|
||||
self.egui_input.events.push(egui::Event::Copy);
|
||||
} else if is_paste_command(self.egui_input.modifiers, keycode) {
|
||||
if let Some(contents) = self.clipboard.get() {
|
||||
self.egui_input.events.push(egui::Event::Text(contents));
|
||||
self.egui_input
|
||||
.events
|
||||
.push(egui::Event::Text(contents.replace("\r\n", "\n")));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user