From 704633fd36399437ebea59dded84324a9f09616a Mon Sep 17 00:00:00 2001 From: Guillaume Nodet Date: Wed, 14 Oct 2015 08:48:24 +0200 Subject: [PATCH] Fix compatibility with jansi 1.11 --- .../java/org/fusesource/jansi/AnsiOutputStream.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/jansi/src/main/java/org/fusesource/jansi/AnsiOutputStream.java b/jansi/src/main/java/org/fusesource/jansi/AnsiOutputStream.java index aab878ee..a46f1415 100644 --- a/jansi/src/main/java/org/fusesource/jansi/AnsiOutputStream.java +++ b/jansi/src/main/java/org/fusesource/jansi/AnsiOutputStream.java @@ -272,9 +272,9 @@ private boolean processEscapeCommand(ArrayList options, int command) thr count++; int value = ((Integer)next).intValue(); if( 30 <= value && value <= 37 ) { - processSetForegroundColor(value-30, false); + processSetForegroundColor(value-30); } else if( 40 <= value && value <= 47 ) { - processSetBackgroundColor(value-40, false); + processSetBackgroundColor(value-40); } else if ( 90 <= value && value <= 97 ) { processSetForegroundColor(value-90, true); } else if ( 100 <= value && value <= 107 ) { @@ -405,9 +405,17 @@ protected void processSetAttribute(int attribute) throws IOException { protected static final int CYAN = 6; protected static final int WHITE = 7; + protected void processSetForegroundColor(int color) throws IOException { + processSetForegroundColor(color, false); + } + protected void processSetForegroundColor(int color, boolean bright) throws IOException { } + protected void processSetBackgroundColor(int color) throws IOException { + processSetBackgroundColor(color, false); + } + protected void processSetBackgroundColor(int color, boolean bright) throws IOException { }