Emulator (vendored xterm):
- Widths follow glibc wcwidth on generated Unicode 16 tables
(tool/gen_unicode_tables.py); combining marks, variation selectors,
ZWJ sequences, skin tones, flags and Hangul jamo join the previous cell,
stored as interned clusters (CellContent.clusterFlag) and drawn and
copied whole. U+FE0F and flags take two columns, as modern terminals
do; a wide character never starts in the last column.
- Box drawing, block elements and Powerline separators are drawn as
geometry filling the cell; rows are whole pixels high.
- Backgrounds merge per colour; each line is a picture reused until the
line changes (BufferLine.version); a line drawn unchanged settles into
one laid out paragraph with a span per style. TerminalStyle and
TerminalTheme compare by value.
App: bundled Symbols Nerd Font Mono subset (568 KiB, MIT) as the
terminal's first fallback, loaded on first use; line height 1.1;
?terminalUnicode=1 fixture showcase; bench gains a progress workload.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
OSC 10/11/12 ; ? is answered with rgb:rrrr/gggg/bbbb from the view's theme
(RenderTerminal reports it through Terminal.setReportedColors), terminated
like the query (BEL or ST). OSC 8 hyperlinks are stored on the cells (a
16-bit id in the attributes; Terminal.hyperlinkAt), survive SGR resets and
end with an empty URI. OSC 52 sets reach Terminal.onClipboardSet decoded;
clipboard reads are not supported. OSC 7 reaches onWorkingDirectoryChange.
OSC bodies keep their semicolons (titles, URIs), and an OSC cut short by
another escape no longer swallows that escape's first byte.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CSI Ps SP q is stored as Terminal.cursorShape / cursorShapeBlinks (Ps 0
returns to the view's configured cursorType; RIS clears it) and reported
by DECRQSS " q". The painter draws the requested shape. A focused block
cursor now redraws the character under it in the background colour
instead of hiding it, spans both columns of a wide character, and the
underline and bar cursors are drawn in the cursor's cell (they were drawn
at the top of the terminal).
Blinking is stored but not animated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ESC c was ignored, so `reset` could not recover a terminal left in the
alternate screen with a hidden cursor, a scroll region or mouse modes.
RIS now resets every mode, the attributes, character sets, tab stops,
margins and saved cursors, returns to the main screen and clears it
(scrollback is kept, as in xterm). DECSTR resets modes, attributes and
margins without touching the text.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
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>
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>
Unmodified copy of lib/, LICENSE (MIT), pubspec.yaml and CHANGELOG.md from
pub.dev xterm 4.0.0; the upstream README is kept as UPSTREAM_README.md.
Committed on its own so later patches are reviewable as diffs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>