Skip to content

Commit 92339ac

Browse files
committed
fix #5849
1 parent ad4a6e8 commit 92339ac

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/common/InputHandler.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2415,7 +2415,7 @@ export class InputHandler extends Disposable implements IInputHandler {
24152415
color &= ~Attributes.RGB_MASK;
24162416
color |= AttributeData.fromColorRGB([c1, c2, c3]);
24172417
} else if (mode === 5) {
2418-
color &= ~(Attributes.CM_MASK | Attributes.PCOLOR_MASK);
2418+
color &= ~(Attributes.CM_MASK | Attributes.RGB_MASK);
24192419
color |= Attributes.CM_P256 | (c1 & 0xff);
24202420
}
24212421
return color;
@@ -2628,19 +2628,19 @@ export class InputHandler extends Disposable implements IInputHandler {
26282628
p = params.params[i];
26292629
if (p >= 30 && p <= 37) {
26302630
// fg color 8
2631-
attr.fg &= ~(Attributes.CM_MASK | Attributes.PCOLOR_MASK);
2631+
attr.fg &= ~(Attributes.CM_MASK | Attributes.RGB_MASK);
26322632
attr.fg |= Attributes.CM_P16 | (p - 30);
26332633
} else if (p >= 40 && p <= 47) {
26342634
// bg color 8
2635-
attr.bg &= ~(Attributes.CM_MASK | Attributes.PCOLOR_MASK);
2635+
attr.bg &= ~(Attributes.CM_MASK | Attributes.RGB_MASK);
26362636
attr.bg |= Attributes.CM_P16 | (p - 40);
26372637
} else if (p >= 90 && p <= 97) {
26382638
// fg color 16
2639-
attr.fg &= ~(Attributes.CM_MASK | Attributes.PCOLOR_MASK);
2639+
attr.fg &= ~(Attributes.CM_MASK | Attributes.RGB_MASK);
26402640
attr.fg |= Attributes.CM_P16 | (p - 90) | 8;
26412641
} else if (p >= 100 && p <= 107) {
26422642
// bg color 16
2643-
attr.bg &= ~(Attributes.CM_MASK | Attributes.PCOLOR_MASK);
2643+
attr.bg &= ~(Attributes.CM_MASK | Attributes.RGB_MASK);
26442644
attr.bg |= Attributes.CM_P16 | (p - 100) | 8;
26452645
} else if (p === 0) {
26462646
// default
@@ -2700,11 +2700,11 @@ export class InputHandler extends Disposable implements IInputHandler {
27002700
} else if (p === 39) {
27012701
// reset fg
27022702
attr.fg &= ~(Attributes.CM_MASK | Attributes.RGB_MASK);
2703-
attr.fg |= DEFAULT_ATTR_DATA.fg & (Attributes.PCOLOR_MASK | Attributes.RGB_MASK);
2703+
attr.fg |= DEFAULT_ATTR_DATA.fg & Attributes.RGB_MASK;
27042704
} else if (p === 49) {
27052705
// reset bg
27062706
attr.bg &= ~(Attributes.CM_MASK | Attributes.RGB_MASK);
2707-
attr.bg |= DEFAULT_ATTR_DATA.bg & (Attributes.PCOLOR_MASK | Attributes.RGB_MASK);
2707+
attr.bg |= DEFAULT_ATTR_DATA.bg & Attributes.RGB_MASK;
27082708
} else if (p === 38 || p === 48 || p === 58) {
27092709
// fg color 256 and RGB
27102710
i += this._extractColor(params, i, attr);

0 commit comments

Comments
 (0)