summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/replicas.zig6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/replicas.zig b/test/replicas.zig
index 7f7ca0b3..6fd65bbe 100644
--- a/test/replicas.zig
+++ b/test/replicas.zig
@@ -2871,7 +2871,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;
};