Fix when a string containing CRLF is pasted from the clipboard (#826)

This commit is contained in:
sumibi-yakitori
2021-10-20 22:26:26 +02:00
committed by GitHub
parent 2a9037cd90
commit 19766bfe4c
2 changed files with 8 additions and 2 deletions
+3 -1
View File
@@ -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")));
}
}
}