Skip to content

terminal: TBC with no parameter clears the tab stop at the cursor - #14644

Merged
mitchellh merged 1 commit into
ghostty-org:mainfrom
jcollie:tbc-default-param
Oct 12, 2026
Merged

mitchellh merged 1 commit into
ghostty-org:mainfrom
jcollie:tbc-default-param

Conversation

@jcollie

@jcollie jcollie commented Oct 11, 2026

Copy link
Copy Markdown
Member

The parameter of TBC (CSI Ps g) defaults to 0, which clears the tab stop at the cursor, but a bare CSI g has no parameters at all, and the stream logged it as an invalid tab clear command and dropped it. Treat it as 0.

This fixes esctest's TBC_Default.

In xterm (patch 412), a missing or zero parameter clears the tab stop at the cursor:

https://github.com/ThomasDickey/xterm-snapshots/blob/bccd466414dc4ecb264a3824a6f1e41bebe65214/charproc.c#L4301-L4308

AI disclosure: Claude Code was used in the preparation of this PR.

The parameter of TBC (CSI Ps g) defaults to 0, which clears the tab stop
at the cursor, but a bare CSI g has no parameters at all, and the stream
logged it as an invalid tab clear command and dropped it. Treat it as 0.

This fixes esctest's TBC_Default.

In xterm (patch 412), a missing or zero parameter clears the tab stop
at the cursor:

  https://github.com/ThomasDickey/xterm-snapshots/blob/bccd466414dc4ecb264a3824a6f1e41bebe65214/charproc.c#L4301-L4308
@jcollie
jcollie requested a review from a team as a code owner October 11, 2026 16:40
@ghostty-bot ghostty-bot Bot added the vt Control sequence related label Oct 11, 2026
@mitchellh
mitchellh merged commit 3434608 into ghostty-org:main Oct 12, 2026
@github-actions github-actions Bot added this to the 1.4.0 milestone Oct 12, 2026
@jcollie
jcollie deleted the tbc-default-param branch October 12, 2026 04:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

vt Control sequence related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants