Skip to content

Commit

Permalink
AttributedStyle: fixed method backgroundRgb()
Browse files Browse the repository at this point in the history
  • Loading branch information
mattirn committed Dec 31, 2020
1 parent cadefd5 commit ae2ff29
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions terminal/src/main/java/org/jline/utils/AttributedStyle.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
*/
package org.jline.utils;

import java.util.Objects;

/**
* Text styling.
*
Expand Down Expand Up @@ -206,7 +204,7 @@ public AttributedStyle background(int r, int g, int b) {
}

public AttributedStyle backgroundRgb(int color) {
return new AttributedStyle(style & ~FG_COLOR | F_BACKGROUND_RGB | ((((long) color & 0xFFFFFF) << FG_COLOR_EXP) & FG_COLOR), mask | F_BACKGROUND_RGB);
return new AttributedStyle(style & ~BG_COLOR | F_BACKGROUND_RGB | ((((long) color & 0xFFFFFF) << BG_COLOR_EXP) & BG_COLOR), mask | F_BACKGROUND_RGB);
}

public AttributedStyle backgroundOff() {
Expand Down

0 comments on commit ae2ff29

Please sign in to comment.