[PR #15648] Add support for colon separated sub-parameters #30691

Open
opened 2026-01-31 09:42:22 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/15648

State: closed
Merged: Yes


Adds support for colon : separated sub parameters in parser. Technically, after this PR, nothing should change except, now sub parameters are parsed, stored safely and we don't invalidate the whole sequence when a : is received within a parameter substring.

In this PR:

  • If sub parameters are detected with a parameter, but the usage is unrecognised, we simply skip the parameter in adaptDispatch.
  • A separate store for sub parameters is used to avoid too many changes to the codebase.
  • We currently allow up to 6 sub parameters for each parameter, extra sub parameters are ignored.
  • Introduced VTSubParameters for easy access to underlying sub parameters.

Info: We don't use sub parameters for any feature yet, this is just the core implementation to support newer usecases.

Validation Steps Performed

  • Use of sub parameters must not have any effect on the output.
  • Skip parameters with unexpected set of sub parameters.
  • Skip sequences with unexpected set of sub parameters.

References #4321
References #7228
References #15599
References https://github.com/xtermjs/xterm.js/pull/2751
Closes #4321

**Original Pull Request:** https://github.com/microsoft/terminal/pull/15648 **State:** closed **Merged:** Yes --- Adds support for colon `:` separated sub parameters in parser. Technically, after this PR, nothing should change except, now sub parameters are parsed, stored safely and we don't invalidate the whole sequence when a `:` is received within a parameter substring. In this PR: - If sub parameters are detected with a parameter, but the usage is unrecognised, we simply *skip* the parameter in `adaptDispatch`. - A separate store for sub parameters is used to avoid too many changes to the codebase. - We currently allow up to `6` sub parameters for each parameter, extra sub parameters are *ignored*. - Introduced `VTSubParameters` for easy access to underlying sub parameters. > **Info**: We don't use sub parameters for any feature yet, this is just the core implementation to support newer usecases. ## Validation Steps Performed - [x] Use of sub parameters must not have any effect on the output. - [x] Skip parameters with unexpected set of sub parameters. - [x] Skip sequences with unexpected set of sub parameters. References #4321 References #7228 References #15599 References https://github.com/xtermjs/xterm.js/pull/2751 Closes #4321
claunia added the pull-request label 2026-01-31 09:42:22 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#30691