Commit Graph

3 Commits

Author SHA1 Message Date
alan 326e7710d4 xterm: add SCOSC/SCORC, CHT, CBT, HPA, HPR and VPR; fix HTS
CSI s / CSI u save and restore the cursor (without parameters; prefixed
forms such as the kitty keyboard query CSI ? u are left alone). CSI I and
CSI Z move by tab stops, CSI ` sets the column, CSI a and CSI e move
relative. ESC H (HTS) set no tab stop because it called isSetAt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 23:26:18 +00:00
alan 7592aa1a82 xterm: consume DCS, SOS, PM and APC strings; answer DECRQSS
ESC P, ESC X, ESC ^ and ESC _ now open a control string whose body is
swallowed up to ST (ESC \), across writes; CAN/SUB or a non-ST ESC abort
it. Previously the bodies were printed (nvim's DECRQSS ESC P $qm ESC \
showed as "$qm"). DECRQSS m and r are answered with DCS 1 $ r ... ST,
other requests with DCS 0 $ r ST. ESC ESC restarts the escape.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 23:25:14 +00:00
alan e94f4856e3 xterm: parse colon subparameters, intermediates and empty CSI params
CSI parameters now record colon subparameters (ITU T.416), so SGR 4:3 is a
curly underline instead of 4 and 3 = 43 (yellow background), and
38:2::r:g:b, 38:2:r:g:b and 38:5:n set colours. Underline styles 4:0-4:5
and 21 (double) are stored on the cell; 58/59 underline colours are
consumed and ignored; 53/55 toggle overline; 22 clears bold and faint;
truncated 38;5 no longer throws.

Intermediate bytes and private prefixes are kept, so CSI > 4;2 m
(modifyOtherKeys) is no longer applied as SGR. An empty parameter reads as
0 (default), so CSI ;5H and CSI 3H position the cursor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 23:23:47 +00:00