From bc42be20740bcbded0771ebe0acfbcfe6c686652 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Sun, 31 May 2026 20:37:23 -0700 Subject: [PATCH] docs(common): correct ST sequence metadata and comment typos - EscapeSequenceParser: ESC ST is ESC backslash (0x1B 0x5C), not ESC plus a double-quote character; align @vt metadata with C1 ST on the following line. - Color.contrastRatio: document l2 as the second luminance argument. - Marker.dispose: fix "change" -> "chance" in dispose listener comment. - Buffer.clear: fix possessive "it's" -> "its" in JSDoc. Co-authored-by: Cursor --- src/common/Color.ts | 2 +- src/common/buffer/Buffer.ts | 2 +- src/common/buffer/Marker.ts | 2 +- src/common/parser/EscapeSequenceParser.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/Color.ts b/src/common/Color.ts index d416d670e..b8a9d8d60 100644 --- a/src/common/Color.ts +++ b/src/common/Color.ts @@ -373,7 +373,7 @@ export function toPaddedHex(c: number): string { /** * Gets the contrast ratio between two relative luminance values. * @param l1 The first relative luminance. - * @param l2 The first relative luminance. + * @param l2 The second relative luminance. * @see https://www.w3.org/TR/WCAG20/#contrast-ratiodef */ export function contrastRatio(l1: number, l2: number): number { diff --git a/src/common/buffer/Buffer.ts b/src/common/buffer/Buffer.ts index be3df09b1..f41b9da67 100644 --- a/src/common/buffer/Buffer.ts +++ b/src/common/buffer/Buffer.ts @@ -142,7 +142,7 @@ export class Buffer extends Disposable implements IBuffer { } /** - * Clears the buffer to it's initial state, discarding all previous data. + * Clears the buffer to its initial state, discarding all previous data. */ public clear(): void { this._stringCache.clear(); diff --git a/src/common/buffer/Marker.ts b/src/common/buffer/Marker.ts index ed5124add..c21575919 100644 --- a/src/common/buffer/Marker.ts +++ b/src/common/buffer/Marker.ts @@ -30,7 +30,7 @@ export class Marker implements IMarker { } this.isDisposed = true; this.line = -1; - // Emit before super.dispose such that dispose listeners get a change to react + // Emit before super.dispose such that dispose listeners get a chance to react this._onDispose.fire(); dispose(this._disposables); this._disposables.length = 0; diff --git a/src/common/parser/EscapeSequenceParser.ts b/src/common/parser/EscapeSequenceParser.ts index a0c97b610..868ab574f 100644 --- a/src/common/parser/EscapeSequenceParser.ts +++ b/src/common/parser/EscapeSequenceParser.ts @@ -18,7 +18,7 @@ import { ApcParser } from './ApcParser'; // @vt: #Y ESC CSI "Control Sequence Introducer" "ESC [" "Start of a CSI sequence." // @vt: #Y ESC OSC "Operating System Command" "ESC ]" "Start of an OSC sequence." // @vt: #Y ESC DCS "Device Control String" "ESC P" "Start of a DCS sequence." -// @vt: #Y ESC ST "String Terminator" "ESC \" "Terminator used for string type sequences." +// @vt: #Y ESC ST "String Terminator" "ESC \\" "Terminator used for string type sequences." // @vt: #Y ESC PM "Privacy Message" "ESC ^" "Start of a privacy message." // @vt: #Y ESC APC "Application Program Command" "ESC _" "Start of an APC sequence." // @vt: #Y C1 CSI "Control Sequence Introducer" "\x9B" "Start of a CSI sequence."