This is a tracking issue for the ongoing audit of xterm behavior and comparison to Ghostty. The goal is to ensure Ghostty behaves identically to xterm for the sequences and features we support. We can diverge in behavior for some unsupported features (such as double height/width lines), though we may want to implement them in the future.
If the sequence is checked below, it means we match xterm behavior identically and we've backed that up with Zig test cases, shell script conformance tests, and English prose documentation.
A "⛔️" prefix means its a sequence we don't support. This does not mean we'll necessarily add support for this sequence, but its listed here so we can take a look. I may be missing some ⛔️ ...
This list is not complete, I'll be updating the list as I go, but I also wanted to keep track of some sequences I skipped.
Sequences
Carriage Return (CR) xterm audit: carriage return #624
Linefeed (LF) xterm audit: LF, VT, FF, CUD (cursor down), IND (index) #626
Vertical Tab (VT) xterm audit: LF, VT, FF, CUD (cursor down), IND (index) #626
Formfeed (FF) xterm audit: LF, VT, FF, CUD (cursor down), IND (index) #626
Index (IND) xterm audit: LF, VT, FF, CUD (cursor down), IND (index) #626
Reverse Index (RI) xterm audit: CNL, CPL, NEL, RI, HTS #655
Cursor Down (CUD) xterm audit: LF, VT, FF, CUD (cursor down), IND (index) #626
Cursor Up (CUU) xterm audit: cursor up (CUU) #629
Cursor Backward (CUB) xterm compat audit: cursor left (CUB) #622
Cursor Forward (CUF) xterm audit: CUF, CUP, HPA, VPA, HPR, VPR #631
Cursor Position (CUP) xterm audit: CUF, CUP, HPA, VPA, HPR, VPR #631
Cursor Previous Line (CPL) xterm audit: CNL, CPL, NEL, RI, HTS #655
Cursor Next Line (CNL) xterm audit: CNL, CPL, NEL, RI, HTS #655
Horizontal Position Absolute (HPA) xterm audit: CUF, CUP, HPA, VPA, HPR, VPR #631
Horizontal Position Relative (HPR) xterm audit: CUF, CUP, HPA, VPA, HPR, VPR #631
Vertical Position Absolute (VPA) xterm audit: CUF, CUP, HPA, VPA, HPR, VPR #631
Vertical Position Relative (VPR) xterm audit: CUF, CUP, HPA, VPA, HPR, VPR #631
Horizontal Tab Forward (CHT) xterm audit: horizontal tab forward and back (CHT, CBT) #627
Horizontal Tab Backward (CBT) xterm audit: horizontal tab forward and back (CHT, CBT) #627
Horizontal Tab Set (HTS) xterm audit: CNL, CPL, NEL, RI, HTS #655
Insert Characters (ICH) xterm audit: insert characters (ICH) #628
Erase Display (ED) xterm audit: ED #638
Erase Line (EL) terminal: EL (erase line) xterm audit #637
Erase Character (ECH) xterm audit: ECH #636
Insert Line (IL) xterm audit: insert line (IL), delete line (DL) #639
Delete Line (DL) xterm audit: insert line (IL), delete line (DL) #639
⚠️ - Need to add test for splitting multi-cell characters
Delete Character (DCH) xterm audit: dch #640
Scroll Down (SD) xterm audit: SD, TBC, DECID #643
Primary Device Attributes (DA1)
Secondary Device Attributes (DA2)
Tertiary Device Attributes (DA3 or DECRPTUI)
Tab Clear (TBC) xterm audit: SD, TBC, DECID #643
Set Mode (SM)
Reset Mode (RM)
Request Mode (RQM)
Set Attribute (SGR)
Cursor Position Report (CPR) xterm audit: cursor position report (CPR) #688
⛔️ Device Status Report (DSR)
⛔️ Media Control (MC)
Set Scroll Region (DECSTBM) xterm audit: DECALN, Top/Bot Margins, Left/Right Margins #646
⛔️ Request Terminal Parameters (DECREQTPARM)
Screen Alignment Pattern (DECALN) xterm audit: DECALN, Top/Bot Margins, Left/Right Margins #646
Set Left and Right Margin (DECSLRM) xterm audit: DECALN, Top/Bot Margins, Left/Right Margins #646
Save Cursor (DECSC) xterm audit: save cursor, restore cursor #686
Restore Cursor (DECRC) xterm audit: save cursor, restore cursor #686
Set Application Keymode (DECKPAM) xterm audit: DECKPAM, DECKPNAM, DECSCUSR, SU, SD #653
Unset Application Keymode (DECKPNM) xterm audit: DECKPAM, DECKPNAM, DECSCUSR, SU, SD #653
Select Cursor Style(DECSCUSR) xterm audit: DECKPAM, DECKPNAM, DECSCUSR, SU, SD #653
⛔️ Load LEDs (DECLL)
⛔️ ANSI Charset Level 1
⛔️ ANSI Charset Level 2
⛔️ ANSI Charset Level 3
⛔️ Select Conformance Level (DECSCL)
Select Character Protection Attribute (DECSCA)
Selective Erase in Display (DECSED)
Selective Erase in Line (DECSEL)
Start Protected Area (SPA)
End Protected Area (EPA)
Scroll Up (SU) xterm audit: DECKPAM, DECKPNAM, DECSCUSR, SU, SD #653
⛔️ Scroll Left (SL)
⛔️ Scroll Right (SR)
⛔️ Delete Column (DECDC)
⛔️ Insert Column (DECIC)
⛔️ Back Index (DECBI)
⛔️ Forward Index (DECFI)
Report Terminal Version
Single Shift 2 (SS2)
Single Shift 3 (SS3)
Locking Shift 2 (LS2)
Locking Shift 3 (LS3)
Locking Shift 1 Right (LS1R)
Locking Shift 2 Right (LS2R)
Locking Shift 3 Right (LS3R)
Save Modes
Restore Modes
Window Operations (CSI t)
Hide Pointer
Full Reset (RIS)
Soft Reset (DECSTR)
Repeat (REP) xterm audit: REP, XTSHIFTESCAPE #659
Set Shift-Escape Configuration (XTSHIFTESCAPE) xterm audit: REP, XTSHIFTESCAPE #659
⛔️ Enable Filter Rectangle (DECEFR)
⛔️ Enable Locator Reporting (DECELR)
⛔️ Select Locator Events (DECSLE)
⛔️ Request Locator Position (DECRQLP)
⛔️ Copy Rectangular Area (DECCRA)
⛔️ Request Checksum of Rectangular Area (DECRQCRA)
⛔️ Erase Rectangular Area (DECERA)
⛔️ Fill Rectangular Area (DECFRA)
⛔️ Selective Erase Rectangular Area (DECSERA)
⛔️ Selective Attribute Change Extent (DECSACE)
⛔️ Change Attributes in Rectangular Area (DECCARA)
⛔️ Reverse Attributes in Rectangular Area (DECRARA)
⛔️ Select columns per page (DECSCPP)
⛔️ Select number of lines per screen (DECSNLS)
⛔️ Request presentation state report (DECRQPSR)
Select active status display (DECSASD)
Select status line type (DECSSDT)
⛔️ Select checksum extension (XTCHECKSUM)
⛔️ Push video attributes onto stack (XTPUSHSGR)
⛔️ Report selected graphic rendition (XTREPORTSGR)
⛔️ Pop video attributes from stack (XTPOPSGR)
⛔️ Push current dynamic- and ANSI-palette colors onto stack (XTPUSHCOLORS)
⛔️ Pop stack to set dynamic- and ANSI-palette colors (XTPOPCOLORS)
⛔️ Report current entry on color stack (XTREPORTCOLORS)
Ignored sequences and why:
Set warning-bell volume (DECSWBV) - A GUI feature, does not affect terminal behavior/rendering.
Set margin-bell volume (DECSMBV) - A GUI feature, does not affect terminal behavior/rendering.
ANSI Modes
DEC Modes
This is a tracking issue for the ongoing audit of xterm behavior and comparison to Ghostty. The goal is to ensure Ghostty behaves identically to xterm for the sequences and features we support. We can diverge in behavior for some unsupported features (such as double height/width lines), though we may want to implement them in the future.
Sequences
CSI t)Ignored sequences and why:
ANSI Modes
DEC Modes