From 71a4a5975c5ac7ef924450f1a64170a6311e702e Mon Sep 17 00:00:00 2001 From: jdf Date: Wed, 24 Feb 2010 18:26:32 +0000 Subject: [PATCH] Remove hack to force newlines when switching streams. This was inserting many spurious newlines. --- app/src/processing/app/EditorConsole.java | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/app/src/processing/app/EditorConsole.java b/app/src/processing/app/EditorConsole.java index b040a75e2..38cf00fc2 100644 --- a/app/src/processing/app/EditorConsole.java +++ b/app/src/processing/app/EditorConsole.java @@ -48,8 +48,6 @@ public class EditorConsole extends JScrollPane { MutableAttributeSet stdStyle; MutableAttributeSet errStyle; - boolean cerror; - int maxLineCount; static File errFile; @@ -222,18 +220,9 @@ public class EditorConsole extends JScrollPane { public void write(byte b[], int offset, int length, boolean err) { - if (err != cerror) { - // advance the line because switching between err/out streams - // potentially, could check whether we're already on a new line - message("", cerror, true); - } - // we could do some cross platform CR/LF mangling here before outputting - // add text to output document message(new String(b, offset, length), err, false); - // set last error state - cerror = err; } @@ -292,10 +281,10 @@ public class EditorConsole extends JScrollPane { // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . - class EditorConsoleStream extends OutputStream { + private static class EditorConsoleStream extends OutputStream { //static EditorConsole current; - boolean err; // whether stderr or stdout - byte single[] = new byte[1]; + final boolean err; // whether stderr or stdout + final byte single[] = new byte[1]; public EditorConsoleStream(boolean err) { this.err = err;