Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
d4acf2f
fix(browser): use radix 10 for padding parseInt in Mouse coords
Tyriar Jun 1, 2026
6ebcf79
fix(common): pass radix 10 to parseInt in getSafariVersion
Tyriar Jun 1, 2026
f04679a
fix(common): pass radix 10 when parsing rgb() components in Color
Tyriar Jun 1, 2026
878e3fc
fix(browser): pass radix 10 when parsing Chrome major version
Tyriar Jun 1, 2026
b0f6aed
fix(common): pass radix 10 when parsing OSC color indices
Tyriar Jun 1, 2026
9955084
fix(fit): add radix and zero fallback for parent width parsing
Tyriar Jun 1, 2026
a2cd1ab
fix(fit): parse terminal padding with radix 10 and zero fallback
Tyriar Jun 1, 2026
f34d0a2
fix(image): pass radix 10 in IIPHandler dimension parsing
Tyriar Jun 1, 2026
a1a8d1a
fix(image): pass radix 10 when parsing kitty graphics numeric keys
Tyriar Jun 1, 2026
d407bf5
fix(webgl): pass radix 10 for SVG arc flag parsing
Tyriar Jun 1, 2026
6fd6003
Merge pull request #5971 from xtermjs/cursor/parseint-radix-10-89d6
Tyriar Jun 1, 2026
c961408
fix(browser): use startY in horizontalDirection row helper call
Tyriar Jun 1, 2026
3f3f6ab
fix(browser): parenthesize document fallback for CoreBrowserService
Tyriar Jun 1, 2026
536eeb4
refactor(browser): remove unreachable coords guard in getCoords
Tyriar Jun 1, 2026
1dd113b
fix(browser): reset TimeBasedDebouncer state on dispose
Tyriar Jun 1, 2026
1a01e96
fix(parser): use correct grammar in Params validation errors
Tyriar Jun 1, 2026
4500485
fix(parser): validate ESC prefix byte range with correct precedence
Tyriar Jun 1, 2026
98d7c25
fix(browser): cancel trailing debounce timeout on immediate refresh
Tyriar Jun 1, 2026
69b11a1
fix(browser): treat rAF id 0 as scheduled in RenderDebouncer
Tyriar Jun 1, 2026
80468ee
fix(browser): clear idle blink timer when handle is 0
Tyriar Jun 1, 2026
bc26cc1
fix(browser): place imports before module const in TimeBasedDebouncer
Tyriar Jun 1, 2026
bc42be2
docs(common): correct ST sequence metadata and comment typos
Tyriar Jun 1, 2026
b45167e
docs: fix comment typos in ThemeService and Constants
Tyriar Jun 1, 2026
7b05c8a
docs: fix comment and JSDoc spelling typos
Tyriar Jun 1, 2026
3a4f9e2
docs: fix "transferred" spelling in CONTRIBUTING.md
Tyriar Jun 1, 2026
e12f007
docs(buffer): fix Content enum names in Constants JSDoc
Tyriar Jun 1, 2026
cf1484d
docs(browser): fix incomplete and typo comments in Mouse.ts
Tyriar Jun 1, 2026
e2d1420
docs(common): fix throughput typo in WriteBuffer comment
Tyriar Jun 1, 2026
5ef8001
docs(common): fix activeVersion onChange JSDoc wording
Tyriar Jun 1, 2026
fd13893
docs(buffer): fix possessive typo in Windows conpty comment
Tyriar Jun 1, 2026
26e771d
docs(common): fix grammar in Unicode and platform comments
Tyriar Jun 1, 2026
8854430
docs(parser): fix sub-parameter limit name in Params JSDoc
Tyriar Jun 1, 2026
2db34c4
docs(common): fix main thread spelling in TaskQueue comment
Tyriar Jun 1, 2026
be3dd80
docs(parser): fix JSDoc typos in IFunctionIdentifier
Tyriar Jun 1, 2026
1252c69
docs(addons): fix comment typos in unicode-graphemes and web-links
Tyriar Jun 1, 2026
a47e490
docs(addon-webgl): fix comment typos in TextureAtlas and GlyphRenderer
Tyriar Jun 1, 2026
58fc09f
docs(webgl): remove duplicate word in context lost README
Tyriar Jun 1, 2026
3494f6b
docs: fix additional comment typos across renderer and selection (add…
cursoragent Jun 1, 2026
fa5eb33
fix: small comment, error string, and guard cleanups (addons only)
cursoragent Jun 1, 2026
1faa41e
docs: fix typos in typings, tests, and core comments (addons only)
cursoragent Jun 1, 2026
0b590da
docs: fix comment typos in BufferReflow, Types, and addons (addons only)
cursoragent Jun 1, 2026
be38252
docs: fix comment typos in Constants, DomRenderer, and addons (addons…
cursoragent Jun 1, 2026
92a1bfc
test(search): send real CSI CUP in #3834 null-char case
Tyriar Jun 1, 2026
a9a2a8e
test(search): reject readFile errors in #2444 fixture loader
Tyriar Jun 1, 2026
8e7e4f1
test(parser): fix typo in EscapeSequenceParser test title
Tyriar Jun 1, 2026
9a70816
test(addon-attach): correct Playwright suite name in AttachAddon tests
Tyriar Jun 1, 2026
967d3f5
docs(addon-image): fix README spelling and wording
cursoragent Jun 1, 2026
096707d
test: fix typos in test titles and comments
cursoragent Jun 1, 2026
5ab5950
Merge pull request #5975 from xtermjs/cursor/contributing-typo-b5c5
Tyriar Jun 1, 2026
6426573
docs(addon-web-links): shorten comment to satisfy max-len after typo fix
cursoragent Jun 1, 2026
94958c2
Fix whitespace
Tyriar Jun 1, 2026
560c0ce
Merge pull request #5978 from xtermjs/cursor/src-docs-typos-0755
Tyriar Jun 1, 2026
5b911db
Merge branch 'master' into cursor/test-fixes-explore-e565
Tyriar Jun 1, 2026
a0f93cd
Merge pull request #5983 from xtermjs/cursor/test-fixes-explore-e565
Tyriar Jun 1, 2026
16ef64f
Merge origin/master into cursor/browser-functional-fixes-b5c0
cursoragent Jun 1, 2026
59264f1
Merge pull request #5974 from xtermjs/cursor/parser-validation-fixes-…
Tyriar Jun 1, 2026
454e074
fix(browser): use ??= in RenderDebouncer for lint
cursoragent Jun 1, 2026
a374c6c
Merge pull request #5980 from xtermjs/cursor/browser-functional-fixes…
Tyriar Jun 1, 2026
4226e64
Merge pull request #5982 from xtermjs/cursor/addons-docs-typos-7eb2
Tyriar Jun 1, 2026
0b6fd2e
Merge pull request #5979 from xtermjs/cursor/addon-image-readme-typos…
Tyriar Jun 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ The preferred way to report bugs or request features is to use

It's pretty common for maintainers of large open source projects to suffer from burnout, especially when needing to triage a large number of incoming issues instead of actually building things. Here are some of the steps we take to try mitigate this:

- Support questions live in [GH discussions](https://github.com/xtermjs/xterm.js/discussions), issues may be transfered there without further comment and core maintainers may or may not participate in discussions.
- Support questions live in [GH discussions](https://github.com/xtermjs/xterm.js/discussions), issues may be transferred there without further comment and core maintainers may or may not participate in discussions.
- Issues are strictly for well defined features or bugs that are _actionable_.
- Sometimes features are out of scope. A common example of this is a niche feature that the pricipal implementation ([VS Code](https://code.visualstudio.com/)) won't leverage and therefore would be difficult to maintain and likely suffer from bitrot. The reporter may not agree with this, but you could always create an addon if that works or maintain your own fork if it comes to that.
- If a feature does not have a clear way forward or needs more discussion it may be closed ro moved to a discussion.
Expand Down
2 changes: 1 addition & 1 deletion addons/addon-attach/test/AttachAddon.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ test.beforeAll(async ({ browser }) => {
});
test.afterAll(async () => await ctx.page.close());

test.describe('Search Tests', () => {
test.describe('AttachAddon', () => {

test.beforeEach(async () => {
await ctx.proxy.reset();
Expand Down
2 changes: 1 addition & 1 deletion addons/addon-clipboard/typings/addon-clipboard.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ declare module '@xterm/addon-clipboard' {
/**
* The clipboard provider interface that enables xterm.js to access the browser clipboard.
*
* Note this this clipboard provider does not implement own cut buffers as xterm does,
* Note that this clipboard provider does not implement own cut buffers as xterm does,
* but redirect the selection parameter always to navigator.clipboard.
*/
export class BrowserClipboardProvider implements IClipboardProvider{
Expand Down
12 changes: 6 additions & 6 deletions addons/addon-fit/src/FitAddon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ export class FitAddon implements ITerminalAddon, IFitApi {
: (this._terminal.options.scrollbar?.width ?? ViewportConstants.DEFAULT_SCROLL_BAR_WIDTH));

const parentElementStyle = _getComputedStyle(this._terminal.element.parentElement);
const parentElementHeight = parseInt(parentElementStyle.getPropertyValue('height'));
const parentElementWidth = Math.max(0, parseInt(parentElementStyle.getPropertyValue('width')));
const parentElementHeight = Math.max(0, parseInt(parentElementStyle.getPropertyValue('height'), 10) || 0);
const parentElementWidth = Math.max(0, parseInt(parentElementStyle.getPropertyValue('width'), 10) || 0);
const elementStyle = _getComputedStyle(this._terminal.element);
const elementPadding = {
top: parseInt(elementStyle.getPropertyValue('padding-top')),
bottom: parseInt(elementStyle.getPropertyValue('padding-bottom')),
right: parseInt(elementStyle.getPropertyValue('padding-right')),
left: parseInt(elementStyle.getPropertyValue('padding-left'))
top: parseInt(elementStyle.getPropertyValue('padding-top'), 10) || 0,
bottom: parseInt(elementStyle.getPropertyValue('padding-bottom'), 10) || 0,
right: parseInt(elementStyle.getPropertyValue('padding-right'), 10) || 0,
left: parseInt(elementStyle.getPropertyValue('padding-left'), 10) || 0
};
const elementPaddingVer = elementPadding.top + elementPadding.bottom;
const elementPaddingHor = elementPadding.right + elementPadding.left;
Expand Down
18 changes: 9 additions & 9 deletions addons/addon-image/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ terminal.loadAddon(imageAddon);
therefore palette animations cannot be used.

- **SIXEL Raster Attributes Handling**
If raster attributes were found in the SIXEL data (level 2), the image will always be truncated to the given height/width extend. We deviate here from the specification on purpose, as it allows several processing optimizations. For level 1 SIXEL data without any raster attributes the image can freely grow in width and height up to the last data byte, which has a much higher processing penalty. In general encoding libraries should not create level 1 data anymore and should not produce pixel information beyond the announced height/width extend. Both is discouraged by the >30 years old specification.
If raster attributes were found in the SIXEL data (level 2), the image will always be truncated to the given height/width extent. We deviate here from the specification on purpose, as it allows several processing optimizations. For level 1 SIXEL data without any raster attributes the image can freely grow in width and height up to the last data byte, which has a much higher processing penalty. In general encoding libraries should not create level 1 data anymore and should not produce pixel information beyond the announced height/width extent. Both is discouraged by the >30 years old specification.

Currently the SIXEL implementation of the addon does not take custom pixel sizes into account, a SIXEL pixel will map 1:1 to a screen pixel.

Expand Down Expand Up @@ -149,9 +149,9 @@ The addon provides the following API endpoints to retrieve raw image data as can

### Memory Usage

The addon does most image processing in Javascript and therefore can occupy a rather big amount of memory. To get an idea where the memory gets eaten, lets look at the data flow and processing steps:
- Incomming image data chunk at `term.write` (terminal)
`term.write` might stock up incoming chunks. To circumvent this, you will need proper flow control (see xterm.js docs). Note that with image output it is more likely to run into this issue, as it can create lots of MBs in very short time.
The addon does most image processing in JavaScript and therefore can occupy a rather big amount of memory. To get an idea where the memory gets eaten, let's look at the data flow and processing steps:
- Incoming image data chunk at `term.write` (terminal)
`term.write` might stack up incoming chunks. To circumvent this, you will need proper flow control (see xterm.js docs). Note that with image output it is more likely to run into this issue, as it can create lots of MBs in very short time.
- Sequence Parser (terminal)
The parser operates on a buffer containing up to 2^17 codepoints (~0.5 MB).
- Sequence Handler - Chunk Decoding (addon)
Expand All @@ -177,18 +177,18 @@ const totalActive = storageBytes + decodingBytes;
```

Note that browsers have offloading tricks for rarely touched memory segments, esp. `storageBytes` might not directly translate into real memory usage. Usage peaks will happen during active decoding of multiple big images due to the need of 2 full pixel buffers at the same time, which cannot be offloaded. Thus you may want to keep an eye on `pixelLimit` under limited memory conditions.
Further note that the formulas above do not respect the Javascript object's overhead. Compared to the raw buffer needs the book keeping by these objects is rather small (<<5%).
Further note that the formulas above do not respect the JavaScript object's overhead. Compared to the raw buffer needs the bookkeeping by these objects is rather small (<<5%).

_Why should I care about memory usage at all?_
Well you don't have to, and it probably will just work fine with the addon defaults. But for bigger integrations, where much more data is held in the Javascript context (like multiple terminals on one page), it is likely to hit the engine's memory limit sooner or later under decoding and/or storage pressure.
Well you don't have to, and it probably will just work fine with the addon defaults. But for bigger integrations, where much more data is held in the JavaScript context (like multiple terminals on one page), it is likely to hit the engine's memory limit sooner or later under decoding and/or storage pressure.

_How can I adjust the memory usage?_
- `pixelLimit`
A constructor setting, thus you would have to anticipate, whether (multiple) terminals in your page gonna do lots of concurrent decoding. Since this is normally not the case and the memory usage is only temporarily peaking, a rather high value should work even with multiple terminals in one page.
A constructor setting, thus you would have to anticipate, whether (multiple) terminals in your page gonna do lots of concurrent decoding. Since this is normally not the case and the memory usage only peaks temporarily, a rather high value should work even with multiple terminals in one page.
- `storageLimit`
A constructor and a runtime setting. In conjunction with `storageUsage` you can do runtime checks and adjust the limit to your needs. If you have to lower the limit below the current usage, images will be removed in FIFO order and may turn into a placeholder in the terminal's scrollback (if `showPlaceholder` is set). When adjusting keep in mind to leave enough room for memory peaking for decoding.
A constructor and a runtime setting. In conjunction with `storageUsage` you can do runtime checks and adjust the limit to your needs. If you have to lower the limit below the current usage, images will be removed in FIFO order and may turn into a placeholder in the terminal's scrollback (if `showPlaceholder` is set). When adjusting keep in mind to leave enough room for peak memory use during decoding.
- `sixelSizeLimit | iipSizeLimit | kittySizeLimit`
Constructor settings. This has only a small impact on peaking memory during decoding. It is meant to avoid processing of overly big or broken image sequences at an earlier phase, thus may stop the invoked decoders from entering memory intensive tasks for potentially invalid data.
Constructor settings. This has only a small impact on peak memory during decoding. It is meant to avoid processing of overly big or broken image sequences at an earlier phase, thus may stop the invoked decoders from entering memory intensive tasks for potentially invalid data.


### Terminal Interaction
Expand Down
6 changes: 3 additions & 3 deletions addons/addon-image/src/IIPHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,8 @@ export class IIPHandler implements IOscHandler, IResetHandler {

private _dim(s: string, total: number, cdim: number): number {
if (s === 'auto') return 0;
if (s.endsWith('%')) return parseInt(s.slice(0, -1)) * total / 100;
if (s.endsWith('px')) return parseInt(s.slice(0, -2));
return parseInt(s) * cdim;
if (s.endsWith('%')) return parseInt(s.slice(0, -1), 10) * total / 100;
if (s.endsWith('px')) return parseInt(s.slice(0, -2), 10);
return parseInt(s, 10) * cdim;
}
}
2 changes: 1 addition & 1 deletion addons/addon-image/src/kitty/KittyGraphicsTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export function parseKittyCommand(data: string): IKittyCommand {
cmd.deleteSelector = value;
continue;
}
const numValue = parseInt(value);
const numValue = parseInt(value, 10);
switch (key) {
case KittyKey.FORMAT: cmd.format = numValue; break;
case KittyKey.ID: cmd.id = numValue; break;
Expand Down
2 changes: 1 addition & 1 deletion addons/addon-ligatures/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const CACHE_SIZE = 100000;

/**
* Enable ligature support for the provided Terminal instance. To function
* properly, this must be called after `open()` is called on the therminal. If
* properly, this must be called after `open()` is called on the terminal. If
* the font currently in use supports ligatures, the terminal will automatically
* start to render them.
* @param term Terminal instance from xterm.js
Expand Down
4 changes: 2 additions & 2 deletions addons/addon-search/test/SearchAddon.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ test.describe('Search Tests', () => {
test.describe('#2444 wrapped line content not being found', () => {
let fixture: string;
test.beforeAll(async () => {
fixture = (await new Promise<Buffer>(r => readFile(resolve(__dirname, '../fixtures/issue-2444'), (err, data) => r(data)))).toString();
fixture = (await new Promise<Buffer>((res, rej) => readFile(resolve(__dirname, '../fixtures/issue-2444'), (err, data) => err ? rej(err) : res(data)))).toString();
if (process.platform !== 'win32') {
fixture = fixture.replace(/\n/g, '\n\r');
}
Expand Down Expand Up @@ -501,7 +501,7 @@ test.describe('Search Tests', () => {
window.search.onDidChangeResults(e => window.calls.push(e));
`);
// Move cursor forward 1 time to create a null character, as opposed to regular whitespace
await ctx.proxy.write('\\x1b[CHi Hi');
await ctx.proxy.write('\x1b[CHi Hi');
strictEqual(await ctx.page.evaluate(`window.search.findPrevious('h', { decorations: { activeMatchColorOverviewRuler: '#ff0000' } })`), true);
deepStrictEqual(await ctx.page.evaluate('window.calls'), [
{ resultCount: 2, resultIndex: 1 }
Expand Down
6 changes: 3 additions & 3 deletions addons/addon-serialize/src/SerializeAddon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -221,7 +221,7 @@ class StringSerializeHandler extends BaseSerializeHandler {
// you can't use control sequence to move cursor to (x === row)
(thisRowLastChar.getChars() || thisRowLastChar.getWidth() === 0) &&
// change background of the first wrapped cell also affects BCE
// so we mark it as invalid to simply the process to determine line separator
// so we mark it as invalid to simplify the process to determine line separator
equalBg(thisRowLastChar, nextRowFirstChar)
) {
isValid = true;
Expand All @@ -233,7 +233,7 @@ class StringSerializeHandler extends BaseSerializeHandler {
isNextRowFirstCharDoubleWidth &&
(thisRowLastSecondChar.getChars() || thisRowLastSecondChar.getWidth() === 0) &&
// change background of the first wrapped cell also affects BCE
// so we mark it as invalid to simply the process to determine line separator
// so we mark it as invalid to simplify the process to determine line separator
equalBg(thisRowLastChar, nextRowFirstChar) &&
equalBg(thisRowLastSecondChar, nextRowFirstChar)
) {
Expand Down
2 changes: 1 addition & 1 deletion addons/addon-serialize/test/SerializeAddon.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ test.describe('SerializeAddon', () => {
const cols = 10;
const line = '+'.repeat(cols);
const lines: string[] = [
sgr(FG_P16_GREEN) + line, // Workaround: If we clear all flags a the end, serialize will use \x1b[0m to clear instead of the sepcific disable sequence
sgr(FG_P16_GREEN) + line, // Workaround: If we clear all flags at the end, serialize will use \x1b[0m to clear instead of the specific disable sequence
sgr(INVERSE) + line,
sgr(BOLD) + line,
sgr(UNDERLINED) + line,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Copyright (c) 2023 The xterm.js authors. All rights reserved.
* @license MIT
*
* UnicodeVersionProvider for V15 with grapeme cluster handleing.
* UnicodeVersionProvider for V15 with grapheme cluster handling.
*/

import type { Terminal, ITerminalAddon, IUnicodeHandling } from '@xterm/xterm';
Expand Down
4 changes: 2 additions & 2 deletions addons/addon-web-links/src/WebLinksAddon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import type { Terminal, ITerminalAddon, IDisposable } from '@xterm/xterm';
import type { WebLinksAddon as IWebLinksApi } from '@xterm/addon-web-links';
import { ILinkProviderOptions, WebLinkProvider } from './WebLinkProvider';

// consider everthing starting with http:// or https://
// consider everything starting with http:// or https://
// up to first whitespace, `"` or `'` as url
// NOTE: The repeated end clause is needed to not match a dangling `:`
// resembling the old (...)*([^:"\'\\s]) final path clause
// additionally exclude early + final:
// - unsafe from rfc3986: !*'()
// - unsafe chars from rfc1738: {}|\^~[]` (minus [] as we need them for ipv6 adresses, also allow ~)
// - unsafe chars from rfc1738: {}|\^~[]` (minus [] for ipv6 addresses, also allow ~)
// also exclude as finals:
// - final interpunction like ,.!?
// - any sort of brackets <>()[]{} (not spec conform, but often used to enclose urls)
Expand Down
2 changes: 1 addition & 1 deletion addons/addon-webgl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ See the full [API](https://github.com/xtermjs/xterm.js/blob/master/addons/addon-

### Handling Context Loss

The browser may drop WebGL contexts for various reasons like OOM or after the system has been suspended. There is an API exposed that fires the `webglcontextlost` event fired on the canvas so embedders can handle it however they wish. An easy, but suboptimal way, to handle this is by disposing of WebglAddon when the event fires:
The browser may drop WebGL contexts for various reasons like OOM or after the system has been suspended. There is an API exposed that fires the `webglcontextlost` event on the canvas so embedders can handle it however they wish. An easy, but suboptimal way, to handle this is by disposing of WebglAddon when the event fires:

```ts
const terminal = new Terminal();
Expand Down
2 changes: 1 addition & 1 deletion addons/addon-webgl/src/GlyphRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ export class GlyphRenderer extends Disposable {
public updateCell(x: number, y: number, code: number, bg: number, fg: number, ext: number, chars: string, width: number, lastBg: number): void {
// Since this function is called for every cell (`rows*cols`), it must be very optimized. It
// should not instantiate any variables unless a new glyph is drawn to the cache where the
// slight slowdown is acceptable for the developer ergonomics provided as it's a once of for
// slight slowdown is acceptable for the developer ergonomics provided as it's a one-off for
// each glyph.
this._updateCell(this._vertices.attributes, x, y, code, bg, fg, ext, chars, width, lastBg);
}
Expand Down
6 changes: 3 additions & 3 deletions addons/addon-webgl/src/TextureAtlas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export class TextureAtlas implements ITextureAtlas {
private _overflowSizePage: AtlasPage | undefined;

private _tmpCanvas: HTMLCanvasElement;
// A temporary context that glyphs are drawn to before being transfered to the atlas.
// A temporary context that glyphs are drawn to before being transferred to the atlas.
private _tmpCtx: CanvasRenderingContext2D;

private _workBoundingBox: IBoundingBox = { top: 0, left: 0, bottom: 0, right: 0 };
Expand Down Expand Up @@ -152,7 +152,7 @@ export class TextureAtlas implements ITextureAtlas {
}

private _createNewPage(): AtlasPage {
// Try merge the set of the 4 most used pages of the largest size. This is is deferred to a
// Try merge the set of the 4 most used pages of the largest size. This is deferred to a
// microtask to ensure it does not interrupt textures that will be rendered in the current
// animation frame which would result in blank rendered areas. This is actually not that
// expensive relative to drawing the glyphs, so there is no need to wait for an idle callback.
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion addons/addon-webgl/src/WebglAddon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Loading
Loading