feat(terminal): port Screen, ScreenSet, Tabstops and Selection

Ports ZIG/src/terminal/{Screen,ScreenSet,Tabstops,Selection}.zig on top
of the page/PageList layer. The cursor holds a TrackedPin; Zig's cached
page_row/page_cell pointers become accessor methods. Selection methods
take the PageList explicitly because tracked bounds are handles.

Screen tests use minimal plain-text dump/selection-string helpers that
follow the formatter's semantics; they will delegate to the real
formatter once formatter.zig is ported.

Gaps found in the PageList layer are recorded for the parity pass in
docs/rewrite/notes/ghostty-terminal-pagelist-requests.md; three resize
tests are #[ignore]d pending those fixes (PageList::resize keeps
trailing blank rows Zig drops). Kitty image storage and StringMap are
placeholders.

Test Plan:
- cargo test -p ghostty-terminal (443 passed, 3 ignored; Screen 183/184,
  Selection 18/18, Tabstops 4/5 - skipped tests use allocator failure
  injection)
This commit is contained in:
ddidderr committed 2026-10-11 22:28:03 +02:00
1 parent 99d3ff9d41
commit 271f5e7bb5
16 files changed
+10070

No files matched your search

+3
View File
@@ -5,7 +5,10 @@ edition.workspace = true
license.workspace = true
[dependencies]
ghostty-datastruct.workspace = true
ghostty-unicode.workspace = true
ghostty-vt.workspace = true
log = "0.4.34"
[lints]
workspace = true