Add support for resetting tab stops (DECST8C) #21058

Open
opened 2026-01-31 07:31:57 +00:00 by claunia · 0 comments
Owner

Originally created by @j4james on GitHub (Jan 6, 2024).

Description of the new feature/enhancement

DECST8C is an escape sequence which resets the tab stops to their default values, i.e. every 8 columns. It's especially useful for a modern terminal because it's the only practical way to restore the default values over an "infinite" width. Without this you'd have to set the positions manually, which limits you to the current screen width (technically you could also perform a hard reset with RIS, but that's not something an application should be doing).

Proposed technical implementation details (optional)

We actually already have a method in AdaptDispatch that performs a tab reset (it's used in the hard reset implementation). We just need to make it public, and hook it up to the relevant escape sequence in the state machine.

It's a little bit more complicated than I'm making out, because the escape sequence takes a parameter value, and DECST8C is only applicable for one specific value, but that's easy enough to handle.

Originally created by @j4james on GitHub (Jan 6, 2024). # Description of the new feature/enhancement [`DECST8C`](https://vt100.net/docs/vt510-rm/DECST8C.html) is an escape sequence which resets the tab stops to their default values, i.e. every 8 columns. It's especially useful for a modern terminal because it's the only practical way to restore the default values over an "infinite" width. Without this you'd have to set the positions manually, which limits you to the current screen width (technically you could also perform a hard reset with `RIS`, but that's not something an application should be doing). # Proposed technical implementation details (optional) We actually already have a method in `AdaptDispatch` that performs a tab reset (it's used in the hard reset implementation). We just need to make it public, and hook it up to the relevant escape sequence in the state machine. It's a little bit more complicated than I'm making out, because the escape sequence takes a parameter value, and `DECST8C` is only applicable for one specific value, but that's easy enough to handle.
claunia added the Issue-FeatureHelp WantedProduct-ConhostIn-PRArea-VT labels 2026-01-31 07:31:58 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21058