Files
pipelines/app/third_party/xterm/README.md
T
alan fea34941d3 xterm: answer DSR 6 one-based; list the local patches
The cursor position report sent zero-based coordinates (the app's
terminal session overrides it with the same fix, which keeps working).
The vendored README now lists every local patch.

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

1.9 KiB

xterm (vendored)

This is our maintained copy of xterm.dart, vendored from the pub.dev release 4.0.0 (MIT, see LICENSE; the upstream README is kept as UPSTREAM_README.md). Upstream is unmaintained, so the app depends on this directory through a path dependency and we patch it here.

The commit that added this directory is the pristine upstream copy; every later change is a local patch. Review them with git log -p -- app/third_party/xterm.

Tests for the patches live in the app tree, app/test/third_party_xterm/, so they run under the memory watchdog with the rest of the app tests. The app's analysis_options.yaml excludes this directory from its strict lints; the code still compiles as part of every app build.

Local patches (keep this list current):

  • CSI parsing: colon subparameters (4:3, 38:2::r:g:b, 58/59), intermediates and private prefixes (CSI > 4;2 m is not SGR), empty parameters as defaults; SGR 21 is double underline, 53/55 overline
  • DCS/APC/PM/SOS strings consumed rather than printed; DECRQSS (m, r, q) answered
  • RIS (ESC c) full reset and DECSTR (CSI ! p)
  • DECSCUSR cursor shapes (blinking is stored, not animated); SCOSC/SCORC, CHT, CBT, HPA, HPR, VPR; HTS sets tab stops; DSR 6 one-based
  • OSC 10/11/12 colour queries from the view's theme; OSC 8 links on cells (Terminal.hyperlinkAt); OSC 52 set (onClipboardSet, no reads); OSC 7 (onWorkingDirectoryChange)
  • alternate screen 1049 restores the cursor; arrow keys follow DECCKM
  • mouse: wheel 64/65, screen-cell coordinates, drag (1002) and motion (1003) reporting, middle button, Shift+drag selects (ui/mouse_listener.dart)
  • rendering: block cursor shows the character inverted, underline/bar cursor position, strikethrough, conceal, overline, underline styles
  • focus reporting (?1004, Terminal.focusInput, called by TerminalView)