@@ -716,6 +716,22 @@ describe('InputHandler', () => {
|
||||
await inputHandler.parseP('\x1b[22m');
|
||||
assert.equal(!!inputHandler.curAttrData.isDim(), false);
|
||||
});
|
||||
it('SGR 221 resets bold only (kitty)', async () => {
|
||||
await inputHandler.parseP('\x1b[1;2m');
|
||||
assert.equal(!!inputHandler.curAttrData.isBold(), true);
|
||||
assert.equal(!!inputHandler.curAttrData.isDim(), true);
|
||||
await inputHandler.parseP('\x1b[221m');
|
||||
assert.equal(!!inputHandler.curAttrData.isBold(), false);
|
||||
assert.equal(!!inputHandler.curAttrData.isDim(), true);
|
||||
});
|
||||
it('SGR 222 resets faint only (kitty)', async () => {
|
||||
await inputHandler.parseP('\x1b[1;2m');
|
||||
assert.equal(!!inputHandler.curAttrData.isBold(), true);
|
||||
assert.equal(!!inputHandler.curAttrData.isDim(), true);
|
||||
await inputHandler.parseP('\x1b[222m');
|
||||
assert.equal(!!inputHandler.curAttrData.isBold(), true);
|
||||
assert.equal(!!inputHandler.curAttrData.isDim(), false);
|
||||
});
|
||||
it('italic', async () => {
|
||||
await inputHandler.parseP('\x1b[3m');
|
||||
assert.equal(!!inputHandler.curAttrData.isItalic(), true);
|
||||
|
||||
@@ -2520,6 +2520,8 @@ export class InputHandler extends Disposable implements IInputHandler {
|
||||
* | 53 | Overlined. | #Y |
|
||||
* | 55 | Not Overlined. | #Y |
|
||||
* | 58 | Underline color: Extended color. | #P[Support for RGB and indexed colors, see below.] |
|
||||
* | 221 | Not bold (kitty extension). | #Y |
|
||||
* | 222 | Not faint (kitty extension). | #Y |
|
||||
* | 90 - 97 | Bright foreground color (analogous to 30 - 37). | #Y |
|
||||
* | 100 - 107 | Bright background color (analogous to 40 - 47). | #Y |
|
||||
*
|
||||
@@ -2652,6 +2654,12 @@ export class InputHandler extends Disposable implements IInputHandler {
|
||||
} else if (p === 55) {
|
||||
// not overline
|
||||
attr.bg &= ~BgFlags.OVERLINE;
|
||||
} else if (p === 221) {
|
||||
// not bold (kitty extension)
|
||||
attr.fg &= ~FgFlags.BOLD;
|
||||
} else if (p === 222) {
|
||||
// not faint (kitty extension)
|
||||
attr.bg &= ~BgFlags.DIM;
|
||||
} else if (p === 59) {
|
||||
attr.extended = attr.extended.clone();
|
||||
attr.extended.underlineColor = -1;
|
||||
|
||||
Reference in New Issue
Block a user