Bugfix in ConsoleColor: always explicitly set boldness.
Always explicitly set the bold parameter 0 for normal, 1 for bold. Once set, the text remains bold even after a color change until it is explicitly set back to normal.
This commit is contained in:
parent
3f1b89aeac
commit
d5cf9a8afb
@ -1,6 +1,6 @@
|
|||||||
#Fri, 21 Nov 2014 15:09:35 -0600
|
#Fri, 21 Nov 2014 15:30:57 -0600
|
||||||
name=jdb-util
|
name=jdb-util
|
||||||
version=3.3
|
version=3.4
|
||||||
lib.local=true
|
lib.local=true
|
||||||
|
|
||||||
build.number=1
|
build.number=1
|
||||||
|
@ -45,19 +45,16 @@ public class ConsoleColor {
|
|||||||
|
|
||||||
public String toString() {
|
public String toString() {
|
||||||
String result = "\u001b[";
|
String result = "\u001b[";
|
||||||
boolean needSemi = false;
|
|
||||||
|
|
||||||
if (bright) {
|
if (bright) result += "1";
|
||||||
result += "1";
|
else result += "0";
|
||||||
needSemi = true; }
|
|
||||||
|
|
||||||
if (fg != null) {
|
if (fg != null) {
|
||||||
if (needSemi) result += ";";
|
result += ";";
|
||||||
result += "3" + Integer.toString(fg.ordinal());
|
result += "3" + Integer.toString(fg.ordinal()); }
|
||||||
needSemi = true; }
|
|
||||||
|
|
||||||
if (bg != null) {
|
if (bg != null) {
|
||||||
if (needSemi) result += ";";
|
result += ";";
|
||||||
result += "4" + Integer.toString(bg.ordinal()); }
|
result += "4" + Integer.toString(bg.ordinal()); }
|
||||||
|
|
||||||
return result + "m";
|
return result + "m";
|
||||||
|
Loading…
Reference in New Issue
Block a user