[pull] master from xtermjs:master#150
Merged
Merged
Conversation
parseInt without a radix can mis-parse leading-zero padding values as octal. Match AccessibilityManager and document rowCount JSDoc typo. Co-authored-by: Cursor <cursoragent@cursor.com>
Safari major version parsing used parseInt without an explicit radix. Other call sites in the repo use base 10; add the radix for consistency and to avoid octal interpretation of leading-zero strings. Co-authored-by: Cursor <cursoragent@cursor.com>
rgba/rgb CSS parsing used parseInt without a radix on captured digit groups. Add base 10 explicitly, matching getSafariVersion and other call sites in the codebase. Co-authored-by: Cursor <cursoragent@cursor.com>
Wheel event DPR factoring parses Chrome/(\d+) with parseInt without a radix. Add base 10 explicitly, matching getSafariVersion and other version parsing in the codebase. Co-authored-by: Cursor <cursoragent@cursor.com>
InputHandler parsed palette indices from OSC color sequences with parseInt without a radix after validating digits-only slots. Use base 10 for set/report and restore color index parsing. Co-authored-by: Cursor <cursoragent@cursor.com>
Align parent width parsing with the height fix: parseInt with radix 10 and || 0 inside Math.max so non-numeric CSS width does not yield NaN cols in proposeDimensions. Co-authored-by: Cursor <cursoragent@cursor.com>
proposeDimensions summed padding-top/bottom/left/right via bare parseInt, so non-numeric padding values produced NaN and broke available width/height. Use radix 10 and || 0 on each side, consistent with parent element size parsing. Co-authored-by: Cursor <cursoragent@cursor.com>
_dim() parsed percent, pixel, and cell dimension strings with parseInt without an explicit radix. Use base 10 for all three paths, consistent with other numeric parsing fixes in the repo. Co-authored-by: Cursor <cursoragent@cursor.com>
KittyGraphicsTypes parsed numeric control values with parseInt without a radix. Use base 10 explicitly for format, id, dimensions, and offset fields. Co-authored-by: Cursor <cursoragent@cursor.com>
CustomGlyphRasterizer parsed large-arc and sweep flags with parseInt without a radix when drawing SVG arc paths. Use base 10 for 0/1 flags. Co-authored-by: Cursor <cursoragent@cursor.com>
fix: pass radix 10 to parseInt across core and addons
horizontalDirection called moveToRequestedRow with targetX as the first argument, but that parameter is the starting row (startY). resetStartingRow and moveToRequestedCol already pass startY correctly; only this copy-paste mistake passed a column index where a row was expected. That could miscompute wrapped-row offsets and emit the wrong horizontal arrow key sequence when building selection/cursor movement strings. Co-authored-by: Cursor <cursoragent@cursor.com>
Nullish coalescing binds tighter than the conditional operator, so the previous expression was parsed as (this._document ?? windowDefined) ? window.document : null. When this._document was set (e.g. parent ownerDocument or documentOverride), the ternary still returned window.document instead of the configured document. CoreBrowserService.mainDocument is used by AccessibilityManager, viewport styles, and decoration renderers; CharSizeService already received this._document directly. Add parentheses so the fallback applies only when _document is nullish. Co-authored-by: Cursor <cursoragent@cursor.com>
getCoordsRelativeToElement always returns a two-element tuple, so the array is always truthy and if (!coords) could never run. hasValidCharSize already handles the only early-exit path before coordinates are computed. Co-authored-by: Cursor <cursoragent@cursor.com>
dispose() cleared the pending timeout but left _refreshTimeoutID and _additionalRefreshRequested set. After dispose, a stale timeout id or trailing-refresh flag could confuse a new instance or tests. Match RenderDebouncer by clearing the timeout id and reset the trailing flag. Co-authored-by: Cursor <cursoragent@cursor.com>
Replace "values lesser than -1" with "values less than -1" in addParam and addSubParam throw messages. "Lesser" is not standard English for numeric comparisons; tests assert the exact message. Co-authored-by: Cursor <cursoragent@cursor.com>
_identifier() checked custom prefix bytes with `res && 0x3c > res || res > 0x3f`, which parsed as `(res && 0x3c > res) || (res > 0x3f)` because && binds tighter than ||. A prefix of NUL (0x00) skipped both clauses and was accepted even though only 0x3c..0x3f are valid. Use an explicit range test: res < 0x3c || res > 0x3f. Mirror the same fix in ApcParser and DcsParser test identifier helpers. Co-authored-by: Cursor <cursoragent@cursor.com>
TimeBasedDebouncer can schedule a trailing setTimeout when refresh requests are throttled. If the debounce window later elapses and an immediate refresh runs, that pending timeout was left armed and could fire afterward, causing a duplicate _innerRefresh (e.g. extra live region updates for screen readers). Clear any pending timeout and reset _additionalRefreshRequested before running the immediate refresh path. Co-authored-by: Cursor <cursoragent@cursor.com>
dispose(), addRefreshCallback(), and refresh() used truthiness on _animationFrame, so a requestAnimationFrame handle of 0 would not be cancelled or deduplicated. Compare against undefined instead, matching other timer checks in the browser layer. Co-authored-by: Cursor <cursoragent@cursor.com>
_clearIdleTimer() used truthiness on _idleTimeout, so a setTimeout handle of 0 would not be cleared. Compare against undefined, consistent with RenderDebouncer rAF handling. Co-authored-by: Cursor <cursoragent@cursor.com>
RENDER_DEBOUNCE_THRESHOLD_MS was declared above the import, which breaks ES module conventions and can confuse tooling. Move the import to the top of the module after the license header. Co-authored-by: Cursor <cursoragent@cursor.com>
- 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 <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Correct "occurred" in IMouseEvent and keydown JSDoc, remove duplicate "This" in EscapeSequenceParser ZDM comment, use "elapsed" instead of "lapsed" in TimeBasedDebouncer, and fix "event" in Keyboard comment. Co-authored-by: Cursor <cursoragent@cursor.com>
Correct typo in the note about moving support questions to GitHub discussions. Co-authored-by: Cursor <cursoragent@cursor.com>
The Content bitmask JSDoc examples used camelCase names that do not exist on the enum (codepointMask, isCombined, hasContent, widthMask, widthShift). Update examples to match the real members: CODEPOINT_MASK, IS_COMBINED_MASK, HAS_CONTENT_MASK, WIDTH_MASK, and WIDTH_SHIFT as used throughout BufferLine and CellData. Co-authored-by: Cursor <cursoragent@cursor.com>
getCoords had a truncated comment ("if there are no valid") and a typo
("addition" vs "additional") in the selection precision note. Complete
the char-size guard comment and fix the selection wording.
Co-authored-by: Cursor <cursoragent@cursor.com>
Correct "throughtput" to "throughput" in the FPS vs throughput tradeoff note inside WriteBuffer. Co-authored-by: Cursor <cursoragent@cursor.com>
The onChange event comment said "activate version changed" while the property is activeVersion. Clarify that the event fires when the active Unicode version changes. Co-authored-by: Cursor <cursoragent@cursor.com>
Change "it's view" to "its view" in the comment explaining why new rows are appended on Windows when using conpty. Co-authored-by: Cursor <cursoragent@cursor.com>
Correct "representation" and "registration" spelling in the comment describing how handler identifiers are encoded for EscapeSequenceParser. Co-authored-by: Cursor <cursoragent@cursor.com>
Correct grapheme/handling spelling in UnicodeGraphemesAddon header and everything/addresses typos in WebLinksAddon URL matcher comments. Co-authored-by: Cursor <cursoragent@cursor.com>
Correct "transferred", remove duplicate "is", and use "one-off" instead of "once of" in developer-facing comments. Co-authored-by: Cursor <cursoragent@cursor.com>
The webglcontextlost section repeated "fired" ("fires the ... event
fired on the canvas"). Drop the extra word.
Co-authored-by: Cursor <cursoragent@cursor.com>
…ons only) Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
… only) Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
The integration test intended to move the cursor forward with ESC [ C but wrote the literal string \x1b[C due to double escaping. Use a single-escaped '\x1b[CHi Hi' so the terminal receives the control sequence and creates the null cell the scenario describes. Co-authored-by: Cursor <cursoragent@cursor.com>
beforeAll always resolved the readFile promise with data even when err was set, which led to calling toString on undefined. Reject the promise on err so fixture load failures surface clearly. Use res/rej callback names to avoid shadowing path.resolve. Co-authored-by: Cursor <cursoragent@cursor.com>
Rename the mocha case "inital states" to "initial states". Co-authored-by: Cursor <cursoragent@cursor.com>
The integration test file used test.describe('Search Tests'), copied from
addon-search. That mislabels attach-addon results in Playwright reports and
makes the suite harder to filter or debug.
Rename the block to 'AttachAddon' so the describe name matches the addon
under test. No test logic changed.
Validated with: npm run build && npm run esbuild, npm run test-unit,
npm run esbuild-demo-client && npm run esbuild-demo-server &&
npm run test-integration, npm run package, npm run package-headless.
Co-authored-by: Cursor <cursoragent@cursor.com>
README spelling and wording fixes only; no code changes. Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
Apply test-only hunks from docs typo fixes: SharedRendererTests duplicate word, SerializeAddon workaround comment, and mouse range spelling in MouseService and InputHandler tests. Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
docs: fix typo in CONTRIBUTING.md
Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
docs(src): fix comment and JSDoc typos
test: search, parser title, and attach suite fixes
Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
…89d6 fix(parser): Params error grammar and ESC prefix precedence
Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
…-b5c0 fix(browser): debounce, render, mouse coords, and CoreBrowserTerminal
docs(addons): fix comment and README typos (webgl, web-links, unicode-graphemes)
…-89d6 docs(addon-image): fix README spelling and wording
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )