summaryrefslogtreecommitdiff
path: root/src/pardes.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-30 16:16:25 -0300
committerGabriel Schneider <[email protected]>2026-10-30 20:25:56 -0300
commit05826d5148b8d75c32397380b9f64e0b3477e5bb (patch)
tree37263052ca93ebf7dc6d823631997ed7f8251dd0 /src/pardes.zig
parent6cb07327b717603be983fdd6df0e6d9009aae39a (diff)
downloadpardes-05826d5148b8d75c32397380b9f64e0b3477e5bb.tar.gz
pardes-05826d5148b8d75c32397380b9f64e0b3477e5bb.zip
replica: pardes's own steps over a terminal speculated, not every input while one has the keyboard (H14): what reaches its program is a pty write and stops as before; its view (normal-mode keys, the wheel, Ctrl-u) moves here at once, the rollback copy keeping each terminal's view (it holds no emulator) and a delta setting it, put back between the units it replays in the order the deltas came among them; what was applied over a terminal applied again over each delta or rows that come while it waits, and its unit taken at once rather than kept to replay over later deltas; closing a terminal stops (its pty's end is the authority's)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/pardes.zig')
-rw-r--r--src/pardes.zig3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pardes.zig b/src/pardes.zig
index 81ea0cdd..22f446a5 100644
--- a/src/pardes.zig
+++ b/src/pardes.zig
@@ -5226,6 +5226,9 @@ pub const Pardes = struct {
for (p.panes, 0..) |slot, id| if (slot == pane) {
if (watched) p.emit(.{ .watch = .{ .pane = @intCast(id), .on = false } });
if (pane.isTerminal()) p.emit(.{ .close_pty = .{ .pane = @intCast(id) } });
+ // Its pty's end and its emulator are the authority's: a replica's
+ // speculation that closes a terminal waits for it.
+ if (pane.terminal != null) tape.poison("close a terminal");
ctlfs.events.noteRetire(p, pane);
// ...and so do bytes still queued for the pty it no longer has.
p.dropPendingWrite(id);