summaryrefslogtreecommitdiff
path: root/test/session.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-17 02:31:20 -0300
committerGabriel Schneider <[email protected]>2026-11-17 12:15:01 -0300
commitf749eb712d990a9b03f1db372d5311e77bd32edd (patch)
treeee4d9966f1eb293054b7ed865c9d4d6eb49e432b /test/session.zig
parent8f6621f9f70db86d56266a59b56dfb92b324b0d9 (diff)
parentb3d32656413734952bc918c2d4cfd12fede6c214 (diff)
downloadpardes-f749eb712d990a9b03f1db372d5311e77bd32edd.tar.gz
pardes-f749eb712d990a9b03f1db372d5311e77bd32edd.zip
integration: the terminal behind src/Term.zig, with the diff viewer and the plumber's first phase
A merge of term-phase0 and pardes-next. File.zig's recolorSyntax keeps the theme's grounds and names Term.Filter and Term.Span; the changelog keeps both sides' entries, the palette sentence in the place of the entry the terminal work cut down. core-test 985/985 on tui; the diff, pager and tree process cases pass, goldens unchanged. Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'test/session.zig')
-rw-r--r--test/session.zig3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/session.zig b/test/session.zig
index fd956aa9..056966b9 100644
--- a/test/session.zig
+++ b/test/session.zig
@@ -30,6 +30,8 @@ pub const Session = struct {
arena: std.heap.ArenaAllocator,
/// Saves the core asked its host for (a host would perform them).
saved: usize = 0,
+ /// The last link the core asked its host to open (a browser would).
+ link: []const u8 = "",
/// The words of the last refusal `refused` answered.
said: []const u8 = "",
tag: u64 = 0,
@@ -277,6 +279,7 @@ pub const Session = struct {
fn drain(s: *Session) void {
while (pardesOf(s).nextEffect()) |e| switch (e) {
.save_file, .save_text => s.saved += 1,
+ .open_link => |u| s.link = s.arena.allocator().dupe(u8, u.slice()) catch "",
// Into the session's state (a database in memory, or its file).
.write_dump => pardes.host_io.writeDump(pardesOf(s), pardesOf(s).dump_out.?),
.addon => pardesOf(s).perform(e),