diff options
Diffstat (limited to 'test/behaviour/placement.zig')
| -rw-r--r-- | test/behaviour/placement.zig | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/behaviour/placement.zig b/test/behaviour/placement.zig index 73d69883..05f730d1 100644 --- a/test/behaviour/placement.zig +++ b/test/behaviour/placement.zig @@ -69,7 +69,8 @@ test "placement: a look from a pane pane/new made after Delcol opens its file in fn spans(s: *Session, comptime n: usize, names: [n][]const u8) ![n][2]usize { var out: [n][2]usize = undefined; for (names, 0..) |name, i| out[i][0] = try tagRow(s, name); - const rows = std.mem.count(u8, try s.screen(), "\n") + 1; + // The last pane ends over the notice row. + const rows = std.mem.count(u8, try s.screen(), "\n"); for (0..n) |i| out[i][1] = (if (i + 1 < n) out[i + 1][0] else rows) - out[i][0]; return out; } @@ -131,8 +132,8 @@ test "placement: a look from the middle of a column splits only the pane it came const names = [_][]const u8{ "/test.txt", "/mid", "/low", "/made" }; // The top and bottom panes dragged by their boxes to two and three // rows, under a placement's minimum; the middle one full of text, so - // the one halved. - const rows = std.mem.count(u8, try s.screen(), "\n") + 1; + // the one halved. (The panes end over the notice row.) + const rows = std.mem.count(u8, try s.screen(), "\n"); const r = try spans(&s, 3, names[0..3].*); try s.write("/mousein", s.at("m 0 {d} 1\nm 0 {d} 1\nm 0 {d} 0\n", .{ r[1][0], r[0][0] + 2, r[0][0] + 2 })); try s.write("/mousein", s.at("m 0 {d} 1\nm 0 {d} 1\nm 0 {d} 0\n", .{ r[2][0], rows - 3, rows - 3 })); |
