Add vtExtensions.kittySgrBoldFaintControl

This commit is contained in:
Daniel Imms
2026-01-10 04:31:36 -08:00
parent 686c67a14b
commit 50b0f3d7ee
4 changed files with 21 additions and 2 deletions
+2 -2
View File
@@ -2672,10 +2672,10 @@ export class InputHandler extends Disposable implements IInputHandler {
} else if (p === 55) {
// not overline
attr.bg &= ~BgFlags.OVERLINE;
} else if (p === 221) {
} else if (p === 221 && (this._optionsService.rawOptions.vtExtensions?.kittySgrBoldFaintControl ?? true)) {
// not bold (kitty extension)
attr.fg &= ~FgFlags.BOLD;
} else if (p === 222) {
} else if (p === 222 && (this._optionsService.rawOptions.vtExtensions?.kittySgrBoldFaintControl ?? true)) {
// not faint (kitty extension)
attr.bg &= ~BgFlags.DIM;
} else if (p === 59) {
+1
View File
@@ -310,6 +310,7 @@ export interface ITerminalQuirks {
export interface IVtExtensions {
kittyKeyboard?: boolean;
kittySgrBoldFaintControl?: boolean;
}
export const IOscLinkService = createDecorator<IOscLinkService>('OscLinkService');
+9
View File
@@ -331,6 +331,15 @@ declare module '@xterm/headless' {
* [0]: https://sw.kovidgoyal.net/kitty/keyboard-protocol/
*/
kittyKeyboard?: boolean;
/**
* Whether [SGR 221 (not bold) and SGR 222 (not faint) are enabled][0].
* These are kitty extensions that allow resetting bold and faint
* independently. The default is true.
*
* [0]: https://sw.kovidgoyal.net/kitty/misc-protocol/
*/
kittySgrBoldFaintControl?: boolean;
}
/**
+9
View File
@@ -448,6 +448,15 @@ declare module '@xterm/xterm' {
* [0]: https://sw.kovidgoyal.net/kitty/keyboard-protocol/
*/
kittyKeyboard?: boolean;
/**
* Whether [SGR 221 (not bold) and SGR 222 (not faint) are enabled][0].
* These are kitty extensions that allow resetting bold and faint
* independently. The default is true.
*
* [0]: https://sw.kovidgoyal.net/kitty/misc-protocol/
*/
kittySgrBoldFaintControl?: boolean;
}
/**