Skip to content

fix: restore cursor visibility and configured newline mode on reset - #6311

Open
Artyx71 wants to merge 2 commits into
xtermjs:masterfrom
Artyx71:fix/reset-terminal-modes
Open

Artyx71 wants to merge 2 commits into
xtermjs:masterfrom
Artyx71:fix/reset-terminal-modes

Conversation

@Artyx71

@Artyx71 Artyx71 commented Nov 9, 2026 •

Copy link
Copy Markdown

Fixes #6302.

A full reset currently leaves a hidden cursor hidden and preserves the host's newline-mode changes. Restore cursor visibility in CoreService.reset and keep LNM as a runtime mode override rather than modifying the embedder's convertEol option.

The effective newline mode falls back to the application's current convertEol setting when no host override exists. RIS and Terminal.reset clear the override. DECSTR preserves it, matching the attributes listed in the VT510 soft-reset reference.

This deliberately separates host mode changes from application configuration: CSI 20 h/l no longer mutate terminal.options.convertEol. Existing set/reset tests now inspect the runtime mode; additional browser and headless tests assert actual line-feed output, mode-query replies, unchanged application options, and resets with both configured defaults.

Validation:

  • Cursor-reset and newline-mode regressions fail before their respective fixes.
  • Build, esbuild and full lint pass.
  • Full unit suite: 2,524 passed.
  • InputHandler browser suite: 814 passed across Chromium, Firefox and WebKit, with 149 existing skips, in the Playwright Docker image. Includes a rendered cursor check after RIS.

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.

RIS (ESC c) keeps a hidden cursor (DECTCEM) and line feed/new line mode (LNM) set

1 participant