Skip to content

terminal: execute C0 controls 0x10-0x1F in the ground state - #14022

Merged
mitchellh merged 1 commit into
mainfrom
stream-c0
Aug 26, 2026
Merged

mitchellh merged 1 commit into
mainfrom
stream-c0

Conversation

@mitchellh

Copy link
Copy Markdown
Contributor

Fixes #14021

The ground state UTF-8 fast paths only classified 0x00-0x0F plus 0x1B (escape) as C0 controls. The remaining C0 bytes (0x10-0x1A, 0x1C-0x1F) were decoded as ordinary codepoints and routed to print as if they were text.

This resulted in incorrect grids but also very weird font fallback, e.g. U+0014 would find CJK fonts.

This commit fixes this by routing every ground state C0 byte except ESC to execute as it should be.

Fixes #14021

The ground state UTF-8 fast paths only classified 0x00-0x0F plus 0x1B (escape)
as C0 controls. The remaining C0 bytes (0x10-0x1A, 0x1C-0x1F) were decoded 
as ordinary codepoints and routed to print as if they were text.

This resulted in incorrect grids but also very weird font fallback, e.g.
U+0014 would find CJK fonts.

This commit fixes this by routing every ground state C0 byte except ESC to 
execute as it should be.
@mitchellh
mitchellh requested a review from a team as a code owner August 26, 2026 03:23
@ghostty-bot ghostty-bot Bot added the vt Control sequence related label Aug 26, 2026
@mitchellh mitchellh added this to the 1.4.0 milestone Aug 26, 2026
@mitchellh
mitchellh merged commit 6dcf68f into main Aug 26, 2026
195 checks passed
@mitchellh
mitchellh deleted the stream-c0 branch August 26, 2026 03:37
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.

1 participant