v0.4.0 terminal over caller's backend

This commit is contained in:
lixen committed 2026-10-16 21:43:18 -04:00
1 parent b62a7d08d1
commit d89e331752
3 files changed
+28

No files matched your search

+5
View File
@@ -35,6 +35,11 @@ consoles with VT processing, and browsers via xterm.js (WASM builds).
Shared code carries no build tags: cell diffing, ANSI generation, escape parsing.
Platform specifics are isolated in the `Backend` implementations.
`NewWithBackend(b, mode)` builds a Terminal over a `Backend` of the caller's
own: a pipe, an in-process emulator or a test standing in for the tty. It
behaves as `New`'s Terminal does, the writer goroutine included; `New` is
`NewWithBackend` over the platform's backend and the detected color mode.
### Rendering pipeline
The application owns a flat `[]Cell` buffer (row-major, `cells[y*width+x]`) and