Skip to content

fix: clamp cursor position reports during pending wrap - #6309

Open
Artyx71 wants to merge 2 commits into
xtermjs:masterfrom
Artyx71:fix/cursor-report-pending-wrap
Open

Artyx71 wants to merge 2 commits into
xtermjs:masterfrom
Artyx71:fix/cursor-report-pending-wrap

Conversation

@Artyx71

@Artyx71 Artyx71 commented Nov 9, 2026 •

Copy link
Copy Markdown

Fixes #6304.

When a line fills the terminal width, the buffer keeps a pending-wrap column at cols. Both cursor-position reports added one to that internal column and replied with a position outside the terminal.

Clamp the reported column to the terminal width without changing the pending-wrap state. Add parser tests for both report variants, one-column terminals, normal positions and subsequent wrapping, plus a browser regression.

Validation:

  • New parser regressions fail before the fix.
  • Build, esbuild and full lint pass.
  • Full unit suite: 2,522 passed.
  • InputHandler browser suite: Chromium 271 passed / 49 skipped; Firefox and WebKit each 270 passed / 50 skipped. Firefox/WebKit ran in the Playwright Docker image; a cold-start Firefox setup timeout passed on the isolated rerun.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cursor position report (CSI 6 n) returns column cols+1 after a full-width line

1 participant