Skip to content

Commit 77c3d3e

Browse files
author
Federico Fissore
committed
Carriage return is not properly handled by EditorConsole, better replace it with a new line
1 parent 152aa59 commit 77c3d3e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

app/src/processing/app/EditorConsole.java

+1
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ public boolean isEmpty() {
126126
}
127127

128128
public void insertString(String line, SimpleAttributeSet attributes) throws BadLocationException {
129+
line = line.replace("\r\n", "\n").replace("\r", "\n");
129130
int offset = document.getLength();
130131
document.insertString(offset, line, attributes);
131132
}

0 commit comments

Comments
 (0)