mirror of
https://github.com/arduino/Arduino.git
synced 2024-11-29 10:24:12 +01:00
ConsoleOutputStream: replacing \r to \n when printing on IDE console
This commit is contained in:
parent
e15ba64ee2
commit
98874e4af2
@ -116,8 +116,9 @@ public class ConsoleOutputStream extends ByteArrayOutputStream {
|
||||
if (document != null) {
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
try {
|
||||
String lineWithoutSlashR = line.replace("\r\n", "\n").replace("\r", "\n");
|
||||
int offset = document.getLength();
|
||||
document.insertString(offset, line, attributes);
|
||||
document.insertString(offset, lineWithoutSlashR, attributes);
|
||||
} catch (BadLocationException ble) {
|
||||
//ignore
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user