summaryrefslogtreecommitdiff
path: root/core/term/term.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-22 03:03:55 -0300
committerGabriel Schneider <[email protected]>2026-11-22 10:31:04 -0300
commit9158de5d50831e115e14e2ed502300ee8c1d9930 (patch)
tree2b5e60569307e02d82b19bd419279392a6da257b /core/term/term.zig
parent70c9e3fbf9cdc7139b4da0142f3a44741a7e1491 (diff)
downloadpardes-9158de5d50831e115e14e2ed502300ee8c1d9930.tar.gz
pardes-9158de5d50831e115e14e2ed502300ee8c1d9930.zip
term: screen_state.zig deleted, and the terminal module's side of the delta road (the old road's deletion, piece 5 of 8): core/term/screen_state.zig (1,213 lines: the encoder, tracks, peers' flights, a replica's apply and holes, its own soak and four tests) goes whole; core/term/terminal.zig loses `encode`/`encodeRows`/`encoder`/`encoderFree`/`track`/`untrack`/`replica`/`replicaFree`/`replicaTop`/`missing`/`apply`/`applyRows`/`shown`/`blank`, `takeMarks` (`marksOf` stays, private: the tests compare two terminals by it), the State's `changes` (a version's counter for the tracks), `read` with `markRead`/`wasRead`/`clearRead` (the rows a step read, for the fills), and `resize_to` with `resizeDeferred` and `resize`'s `later` (screen state's authority sized its terminals after a step's unit); abi/term.zig loses the `Encoder`/`Track`/`Replica` handles, `flight_bound`, `Peer`, `Applied` and those entries of `Ops` (and `dumpScreen`, which nothing in the core called); core/Term.zig its wrappers; core/term/term.zig its ops, its handle map and its `screen_state` export; core/panes.zig its `resizeDeferred` and resizes now (its later screen-state lines go in piece 6); core/edit.zig its `markRead`; the cell-for-cell dump the soak compares a client's terminal with its session's by moves to terminal.zig (`dumpScreen`, over the emulator), the soak's three streams (a shell's, a full-screen program's, `yes`) into test/replicas.zig, their one user; test/terminal.zig loses `a replica's terminal pane draws as its authority's does` (a delta's) and `a terminal made fresh has no size waiting` (`resize_to`'s); core-test 911/1068 (157 skipped), shell-test 1110/1113, term-test 15/15, pane-test 181/182 (again after the machines reboot, on a wiped cache), the soaks small run and `--echo` rc 0
Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'core/term/term.zig')
-rw-r--r--core/term/term.zig30
1 files changed, 2 insertions, 28 deletions
diff --git a/core/term/term.zig b/core/term/term.zig
index 59511727..058154a7 100644
--- a/core/term/term.zig
+++ b/core/term/term.zig
@@ -1,7 +1,7 @@
//! The terminal, a module of its own (docs/next-terminal.md, Phase 1):
//! ghostty-vt's emulator and what pardes keeps beside it (terminal.zig),
-//! the screen state its replicas are sent (screen_state.zig), the kitty
-//! images it draws (TerminalImages.zig) and the pager's parse (pager.zig).
+//! the kitty images it draws (TerminalImages.zig) and the pager's parse
+//! (pager.zig).
//! It imports std, ghostty-vt, wuffs, zstbi and `plain`, never the core:
//! the core reaches it through `ops` (core/Term.zig), the records of
//! abi/term.zig in and out.
@@ -10,11 +10,8 @@ const plain = @import("plain");
const iface = plain.term;
const terminal_ = @import("terminal.zig");
const pager = @import("pager.zig");
-const screen_state_ = @import("screen_state.zig");
const TerminalImages = terminal_.TerminalImages;
-/// The screen state replicas are sent, its streams and soak (test/replicas.zig).
-pub const screen_state = screen_state_;
/// The emulator itself, for the tests that read it through a core
/// (test/terminal.zig).
pub const terminal = terminal_;
@@ -39,7 +36,6 @@ pub const ops: iface.Ops = .{
.scroll = cast(iface.Ops, "scroll", terminal_.scroll),
.follow = cast(iface.Ops, "follow", terminal_.follow),
.resize = cast(iface.Ops, "resize", terminal_.resize),
- .resizeDeferred = cast(iface.Ops, "resizeDeferred", terminal_.resizeDeferred),
.cellPixels = cast(iface.Ops, "cellPixels", terminal_.cellPixels),
.replies = cast(iface.Ops, "replies", terminal_.replies),
.key = cast(iface.Ops, "key", terminal_.key),
@@ -57,7 +53,6 @@ pub const ops: iface.Ops = .{
.viewport = cast(iface.Ops, "viewport", terminal_.viewport),
.editRows = cast(iface.Ops, "editRows", terminal_.editRows),
.promptCut = cast(iface.Ops, "promptCut", terminal_.promptCutAt),
- .markRead = cast(iface.Ops, "markRead", terminal_.markRead),
.echoCell = cast(iface.Ops, "echoCell", terminal_.echoCell),
.page = pager.parse,
.filter = terminal_.pagerFilter,
@@ -65,32 +60,12 @@ pub const ops: iface.Ops = .{
.paint = cast(iface.Ops, "paint", terminal_.paint),
.images = cast(iface.Ops, "images", terminal_.images),
.hasImages = cast(iface.Ops, "hasImages", terminal_.hasImages),
- .encoder = cast(iface.Ops, "encoder", terminal_.encoder),
- .encoderFree = cast(iface.Ops, "encoderFree", terminal_.encoderFree),
- .track = cast(iface.Ops, "track", terminal_.track),
- .untrack = cast(iface.Ops, "untrack", terminal_.untrack),
- .encode = cast(iface.Ops, "encode", terminal_.encode),
- .encodeRows = cast(iface.Ops, "encodeRows", terminal_.encodeRows),
- .wasRead = cast(iface.Ops, "wasRead", terminal_.wasRead),
- .clearRead = cast(iface.Ops, "clearRead", terminal_.clearRead),
- .replica = cast(iface.Ops, "replica", terminal_.replica),
- .replicaFree = cast(iface.Ops, "replicaFree", terminal_.replicaFree),
- .replicaTop = cast(iface.Ops, "replicaTop", terminal_.replicaTop),
- .missing = cast(iface.Ops, "missing", terminal_.missing),
- .apply = cast(iface.Ops, "apply", terminal_.apply),
- .applyRows = cast(iface.Ops, "applyRows", terminal_.applyRows),
- .shown = cast(iface.Ops, "shown", terminal_.shown),
- .blank = cast(iface.Ops, "blank", terminal_.blank),
- .dumpScreen = cast(iface.Ops, "dumpScreen", terminal_.dumpScreen),
};
/// The term's handle types as the interface names them, and the module's
/// own behind each: a pointer to one is a pointer to the other.
const handles = .{
.{ iface.State, terminal_.State },
- .{ iface.Encoder, screen_state_.Encoder },
- .{ iface.Track, screen_state_.Track },
- .{ iface.Replica, screen_state_.Replica },
};
/// The interface's handle for one of this module's own types, or the type
@@ -160,5 +135,4 @@ test {
_ = &ops;
_ = terminal_;
_ = pager;
- _ = screen_state_;
}