summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/replicas.zig21
1 files changed, 10 insertions, 11 deletions
diff --git a/test/replicas.zig b/test/replicas.zig
index 57b6ff23..910c6e57 100644
--- a/test/replicas.zig
+++ b/test/replicas.zig
@@ -794,19 +794,16 @@ const Soak = struct {
/// A Peer's queue, swapped out as its writer swaps it (the Peers'
/// allocator's).
sending: std.ArrayListUnmanaged(u8) = .empty,
- /// This wait ended at its frame's tick: its pump draws.
- at_frame: bool = false,
fn of(ctx: ?*anyopaque) *Soak {
return @ptrCast(@alignCast(ctx.?));
}
- /// Its own view drawn at its frame's tick (`.frame`), as the soak's
- /// session always drew it; not after every pump, as a terminal's is:
- /// drawn so, the soak finds a client's step replayed with a kind's call
- /// more than the session's (reports/pardes-runners-d.md).
- fn watchedHost(ctx: ?*anyopaque) bool {
- return of(ctx).at_frame;
+ /// Its own view drawn after every pump, as a terminal's session draws
+ /// its own (Core.render: drawn whenever a frame is owed and someone
+ /// sees it, and a terminal is always seen).
+ fn watchedHost(_: ?*anyopaque) bool {
+ return true;
}
fn ptyWrite(ctx: ?*anyopaque, id: pardes.Pane.Id, bytes: []const u8) void {
@@ -1128,7 +1125,6 @@ const Soak = struct {
return false;
}
var took_output = false;
- s.at_frame = false;
// What its boundary took is old news.
_ = s.l.peers.urgent.swap(false, .acq_rel);
while (true) {
@@ -1223,7 +1219,6 @@ const Soak = struct {
s.frames_left = if (busy) 120 else s.frames_left -| 1;
if (s.frames_left > 0) try net.send(.{ .at = m.at + frame_us, .n = 0, .kind = .frame, .who = 0, .bytes = &.{} });
if (took_output or core.needs_frame or (core.nextWake() orelse std.math.maxInt(u64)) <= s.now_ns) {
- s.at_frame = true;
s.framed = true;
s.encode_ns = s.l.peers.screens.encode_ns;
return false;
@@ -2875,7 +2870,11 @@ const Shown = struct {
if (a.cols != b.cols or a.rows != b.rows) return std.fmt.bufPrint(buf, "the size {d}x{d} against {d}x{d}", .{ a.cols, a.rows, b.cols, b.rows }) catch "the size";
var cells: usize = 0;
var first: usize = 0;
- for (a.cells.items, b.cells.items, 0..) |x, y, i| if (!std.meta.eql(x, y)) {
+ // As a frontend reads a cell (Cell.visuallyEqual, glide.sameRow):
+ // its text up to `len`, its style, or that it is blank. The bytes
+ // of `text` past `len` are whatever its cell held before
+ // (Surface.set copies the grapheme's own): no frontend reads them.
+ for (a.cells.items, b.cells.items, 0..) |x, y, i| if (!x.visuallyEqual(&y)) {
if (cells == 0) first = i;
cells += 1;
};