summaryrefslogtreecommitdiff
path: root/src/dump.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-17 00:51:06 -0300
committerGabriel Schneider <[email protected]>2026-11-17 12:15:01 -0300
commit8f6621f9f70db86d56266a59b56dfb92b324b0d9 (patch)
treefb094b45c06f45855dbeb7489552553fb1998d57 /src/dump.zig
parent84c2699e22d9660ef5b6de54643c0c78f2e8e855 (diff)
downloadpardes-8f6621f9f70db86d56266a59b56dfb92b324b0d9.tar.gz
pardes-8f6621f9f70db86d56266a59b56dfb92b324b0d9.zip
Term: the replica half and the seam's last reaches: screen_state.zig's terminal half is reached through the interface (Term.encode, Term.encodeRows and Term.untrack on the authority, Term.wasRead and Term.clearRead for the rows a step read, Term.apply with the prompt marks riding a delta, Term.applyRows, Term.shown and Term.blank on a replica, Term.Encoder, Track, Peer and Replica its handles), so replica.zig reaches no emulator state; its kind half (a kind's frame as a Shadow, its strips and Blobs, encodeShadow) is the core's and moves, as it is, with its tests, to Kind.zig beside the Slot it shadows; predicted echo is Term.Echo; the draw entries (Term.recolor, Term.images, Term.petscii, Term.togglePetscii, Term.hasImages, Term.Filter, Term.FilterPalette, Term.palColor) are reached through the interface with their signatures as they were, not yet plain data (Term.zig says so); src/Term.zig is the one file outside src/term/ that imports one inside it (fs.zig embeds terminal.zig's text as a served source), panes.terminal, pardes.screen_state and pardes.echo go, the comments that named ghostty for the emulator say the emulator, and the tests that read emulator state read the records but three (Core.zig's palette, pty.zig's output pin and page limit); the changelog says so; nothing else changes
Diffstat (limited to 'src/dump.zig')
-rw-r--r--src/dump.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dump.zig b/src/dump.zig
index 38be263d..31765836 100644
--- a/src/dump.zig
+++ b/src/dump.zig
@@ -74,7 +74,7 @@ pub var terminal_gpa: ?std.mem.Allocator = null;
//
// A dump is everything the session is but what is the host's, the frame's
// or worked out again: its panes with their text and undo, terminals with
-// their screens, history and kitty images (ghostty's snapshot), registers,
+// their screens, history and kitty images (the emulator's snapshot), registers,
// places, tags, layout and settings. It crosses builds: its fields are
// matched by name. It is an image (Db.zig): a database in memory the walk
// writes by name (walk.Put), which the state file keeps under a label,
@@ -1037,13 +1037,13 @@ test "an upgraded session's dump keeps its views and its running terminal as the
const was = pardes.Term.grid(p.panes[0].?.terminal);
const is = pardes.Term.grid(q.panes[0].?.terminal);
try std.testing.expectEqual([2]u16{ was.cursor_x, was.cursor_y }, [2]u16{ is.cursor_x, is.cursor_y });
- try std.testing.expect(q.panes[0].?.terminal.?.vt.screens.active_key == .alternate);
+ try std.testing.expect(pardes.Term.modes(q.panes[0].?.terminal).alternate);
while (q.nextEffect()) |e| try std.testing.expect(e != .spawn);
// Not kept, the same terminal is a new shell's under its history.
kept[0] = false;
const r = try resumeFromDump(gpa, .{ .tty_only = true, .cols = 40, .rows = 12 }, bytes, &kept);
defer r.deinit();
- try std.testing.expect(r.panes[0].?.terminal.?.vt.screens.active_key == .primary);
+ try std.testing.expect(!pardes.Term.modes(r.panes[0].?.terminal).alternate);
}
test "a loaded session asks its host for its font again: a new process has only its built-in face" {