1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-03-13 10:29:35 +01:00

Carriage return is not properly handled by EditorConsole, better replace it with a new line

This commit is contained in:
Federico Fissore 2015-11-03 13:17:26 +01:00
parent 152aa595ec
commit 77c3d3eaa8

View File

@ -126,6 +126,7 @@ public class EditorConsole extends JScrollPane {
}
public void insertString(String line, SimpleAttributeSet attributes) throws BadLocationException {
line = line.replace("\r\n", "\n").replace("\r", "\n");
int offset = document.getLength();
document.insertString(offset, line, attributes);
}