fix: small comment, error string, and guard cleanups

- Services JSDoc: "to determine" grapheme clustering wording
- AttributeData: "persistent" spelling in comment
- Buffer.setupTabStops: check only `undefined` (param is `number | undefined`)
- SerializeAddon: fix "we must" and duplicate "the" in comment
- WebglAddon: use "WebGL2" in Safari support error for consistency
- TextureAtlas: "relevant" spelling in comment

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Daniel Imms
2026-06-01 15:28:33 +00:00
committed by Cursor Agent
co-authored by Cursor
parent 1e554992f6
commit faaa549355
6 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -173,7 +173,7 @@ class StringSerializeHandler extends BaseSerializeHandler {
private _thisRowLastSecondChar: IBufferCell = this._buffer.getNullCell();
private _nextRowFirstChar: IBufferCell = this._buffer.getNullCell();
protected _rowEnd(row: number, isLastRow: boolean): void {
// if there is colorful empty cell at line end, whe must pad it back, or the the color block
// if there is colorful empty cell at line end, we must pad it back, or the color block
// will missing
if (this._nullCellCount > 0 && !equalBg(this._cursorStyle, this._backgroundCell)) {
// use clear right to set background.
+1 -1
View File
@@ -1125,7 +1125,7 @@ function clearColor(imageData: ImageData, bg: IColor, fg: IColor, enableThreshol
// were covered (fg=#8ae234, bg=#c4a000).
const threshold = Math.floor((Math.abs(r - fgR) + Math.abs(g - fgG) + Math.abs(b - fgB)) / 12);
// Set alpha channel of relevent pixels to 0
// Set alpha channel of relevant pixels to 0
let isEmpty = true;
for (let offset = 0; offset < imageData.data.length; offset += 4) {
// Check exact match
+1 -1
View File
@@ -40,7 +40,7 @@ export class WebglAddon extends Disposable implements ITerminalAddon, IWebglApi
};
const gl = document.createElement('canvas').getContext('webgl2', contextAttributes) as IWebGL2RenderingContext;
if (!gl) {
throw new Error('Webgl2 is only supported on Safari 16 and above');
throw new Error('WebGL2 is only supported on Safari 16 and above');
}
}
super();
+1 -1
View File
@@ -204,7 +204,7 @@ export class ExtendedAttrs implements IExtendedAttrs {
/**
* Convenient method to indicate whether the object holds no additional information,
* that needs to be persistant in the buffer.
* that needs to be persistent in the buffer.
*/
public isEmpty(): boolean {
return this.underlineStyle === UnderlineStyle.NONE && this._urlId === 0;
+1 -1
View File
@@ -578,7 +578,7 @@ export class Buffer extends Disposable implements IBuffer {
* @param i The index to start setting up tab stops from.
*/
public setupTabStops(i?: number): void {
if (i !== null && i !== undefined) {
if (i !== undefined) {
if (!this.tabs[i]) {
i = this.prevStop(i);
}
+1 -1
View File
@@ -324,7 +324,7 @@ export interface IOscLinkService {
* bit 0: shouldJoin - should combine with preceding character.
* bit 1..2: wcwidth - see UnicodeCharWidth.
* bit 3..31: class of character (currently only 4 bits are used).
* This is used to determined grapheme clustering - i.e. which codepoints
* This is used to determine grapheme clustering - i.e. which codepoints
* are to be combined into a single compound character.
*
* Use the UnicodeService static function createPropertyValue to create a