Fixed EditorConsole new-line regression.

Now EditorConsole starts a newline also when a CR character is read
from command output.
This commit is contained in:
Cristian Maglie 2014-11-25 15:26:18 +01:00
parent 15f3d1f8e7
commit 6eef453944
1 changed files with 1 additions and 1 deletions

View File

@ -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));