fix: generated terminfo entry was missing setaf/setab
colors#256 and pairs#65536 were declared, but the entry had no
setaf/setab string capabilities to actually invoke color — an
ncurses-linked program (ls, git, vim, htop, ...) checks tigetstr for
these before ever emitting color, so despite advertising 256-color
support, every spawned program rendered monochrome. Root-caused from a
real report: colors missing in terminals spawned from a packaged
build.
Added the same parameterized setaf/setab xterm-256color uses
(verified against a real xterm-256color terminfo entry), which
matches run_sgr's own color-code ranges exactly: codes 0-7 use classic
SGR 30-37/40-47, 8-15 use aixterm's bright SGR 90-97/100-107, and
16-255 use indexed 38;5;n/48;5;n — all three already implemented in
vt/parser.odin's run_sgr. Added a regression test asserting both caps
are present.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KpDBFeBQKx9f5U3pfVeVV3