Extract AltMouseCursorController to bind DOM listeners only when the option and mouse protocol are active.
Co-authored-by: Cursor <cursoragent@cursor.com>
Alt is only used locally to gate passthrough; applications like tmux ignore alt-modified SGR sequences.
Co-authored-by: Cursor <cursoragent@cursor.com>
When enabled during mouse events mode, click/drag/move events require the alt
key while wheel events are unaffected. Selection stays enabled by default
and takes precedence over macOptionClickForcesSelection.
Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
Align headless Terminal core API with browser CoreBrowserTerminal
and the public registerMarker naming.
Fixes#5938
Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
Replace map().reduce() with one accumulator loop in
reflowSmallerGetNewLineLengths to avoid allocating an intermediate
array when summing wrapped line trimmed lengths.
Fixes#5942
Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
The constructor defined property getters/setters twice on _publicOptions;
the first block was immediately overwritten by the second. Align with the
browser public Terminal implementation.
Fixes#5935
Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
The windowsPty option change handler checked buildNumber twice
instead of requiring both backend and buildNumber to be defined.
This aligns with Buffer.ts and ensures ConPTY wrapping heuristics
are evaluated only when both fields are present.
Fixes#5934
Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
Replace PayloadStringBuffer with LimitedStringBuilder from common.
Add thorough StringBuilder and LimitedStringBuilder test coverage.
Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
Remove common/Clone.ts and its tests. Use the native structuredClone API
for cloning default modes, options, and test fixtures.
Fixes#5911
Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
Replace direct console.log/warn/error calls in the WebGL addon with
ILogService so messages respect the terminal logLevel and custom logger.
Fixesxtermjs/xterm.js#5921
Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
configEquals omitted deviceMaxTextureSize, deviceCellWidth, and
deviceCellHeight, which could cause the char atlas cache to reuse an
atlas built for a different GPU texture limit or cell size.
Fixes#5915
Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
Register vertex array objects for disposal in GlyphRenderer and
RectangleRenderer, matching existing buffer and program cleanup.
Fixes#5918
Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
Replace repeated string concatenation with a chunk buffer that joins
once on completion. Fixes#5916.
Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
flushSync() processes pending writes synchronously (e.g. during
CoreTerminal.resize()) but did not emit onWriteParsed, unlike the
async _innerWrite path. Addons listening for parse completion could
miss updates after resize.
Fixes#5912
Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
Headless clear() now calls buffer.clearAllMarkers() to match the browser
implementation, preventing markers from surviving clear() and pointing at
wrong lines.
Fixes#5910
Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
Dispose _onRemoveTextureAtlasCanvas in TextureAtlas.dispose() alongside
_onAddTextureAtlasCanvas to avoid leaking listeners when the atlas is torn down.
Fixes#5917
Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
Register _trimListener via _register(MutableDisposable) so it is disposed
when SelectionService is torn down. Use .value assignment on buffer
activate instead of manual dispose/swap.
Fixes#5914
Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
Fixes#5913. Blinking is supported in renderers via TextBlinkStateManager,
and bright background colors (100-107) are handled in the SGR loop.
Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
Wrap the onBufferActivate subscription in this._register so it is
disposed when BufferNamespaceApi is disposed, matching the pattern used
elsewhere in the codebase.
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
Document multi-variant escape handlers with separate /** ... */ lines
instead of multiline blocks.
Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
Replace multiline-comment-style (starred-block), which also forces
multiline // comments into block comments, with jsdoc/multiline-blocks.
That rule only enforces starred JSDoc layout for /** blocks (no text on
the opening line) and leaves multiline // comments unchanged for
internal documentation.
Fix multiline JSDoc in Types.ts.
Fixes#5899
Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
Enable multiline-comment-style with starred-block to require JSDoc-style
block comments with content on separate lines from the opening delimiter.
Auto-fix existing violations across the codebase.
Fixes#5899
Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>