Skip to content

Commit

Permalink
Reset terminal color immediately
Browse files Browse the repository at this point in the history
This prevents issues with other output that might not use these methods.

Signed-off-by: Stefan Marr <git@stefan-marr.de>
  • Loading branch information
smarr committed Mar 7, 2018
1 parent 217ec99 commit 606d882
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/som/Output.java
Expand Up @@ -35,7 +35,7 @@ public static class AnsiColor8 {
@TruffleBoundary
private static void print(final String msg, final String color, final PrintStream s) {
if (VmSettings.ANSI_COLOR_IN_OUTPUT) {
s.print(color + msg);
s.print(color + msg + AnsiColor8.RESET);
} else {
s.print(msg);
}
Expand All @@ -44,7 +44,7 @@ private static void print(final String msg, final String color, final PrintStrea
@TruffleBoundary
private static void println(final String msg, final String color, final PrintStream s) {
if (VmSettings.ANSI_COLOR_IN_OUTPUT) {
s.println(color + msg);
s.println(color + msg + AnsiColor8.RESET);
} else {
s.println(msg);
}
Expand All @@ -55,11 +55,11 @@ public static void println(final String msg, final String color) {
}

public static void print(final String msg) {
print(msg, AnsiColor8.RESET, System.out);
print(msg, "", System.out);
}

public static void println(final String msg) {
println(msg, AnsiColor8.RESET);
println(msg, "");
}

public static void errorPrintln(final String msg) {
Expand Down

0 comments on commit 606d882

Please sign in to comment.