From 6eef4539447a5661f388d11b6db40db1b61def8c Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Tue, 25 Nov 2014 15:26:18 +0100 Subject: [PATCH] Fixed EditorConsole new-line regression. Now EditorConsole starts a newline also when a CR character is read from command output. --- app/src/processing/app/EditorConsole.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/processing/app/EditorConsole.java b/app/src/processing/app/EditorConsole.java index 805a8d768..8c4910093 100644 --- a/app/src/processing/app/EditorConsole.java +++ b/app/src/processing/app/EditorConsole.java @@ -206,7 +206,7 @@ class BufferedStyledDocument extends DefaultStyledDocument { char c = chars[stop]; stop++; currentLineLength++; - if (c == '\n' || currentLineLength > maxLineLength) { + if (c == '\n' || c == '\r' || currentLineLength > maxLineLength) { elements.add(new ElementSpec(a, ElementSpec.ContentType, chars, start, stop - start)); elements.add(new ElementSpec(a, ElementSpec.EndTagType));