summaryrefslogtreecommitdiff
path: root/test/kitty.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/kitty.zig')
-rw-r--r--test/kitty.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/kitty.zig b/test/kitty.zig
index 76d97421..22b62fb2 100644
--- a/test/kitty.zig
+++ b/test/kitty.zig
@@ -641,14 +641,14 @@ test "kitty: an image follows its text when the shell scrolls, resizes and reflo
try std.testing.expectEqual(o.y + 2, (try r.placesOf(10))[0].dst.y);
// A narrower pane reflows the text; the image stays on its row.
const pane = r.pane(0);
- pane.resizeGrid(40, pane.rows);
+ pane.resizeGrid(0, 40, pane.rows);
const text = try pardes.Term.scrollback(pane.terminal, r.frame.allocator());
var row: usize = 0;
var lines = std.mem.splitScalar(u8, text, '\n');
while (lines.next()) |line| : (row += 1) if (std.mem.startsWith(u8, line, "marker")) break;
const drawn = try r.placesOf(10);
try std.testing.expectEqual(@as(usize, 1), drawn.len);
- const viewport_top: usize = pardes.Term.grid(pane.terminal).offset;
+ const viewport_top: usize = pane.termTop();
try std.testing.expectEqual(o.y + @as(u16, @intCast(row - viewport_top)), drawn[0].dst.y);
}
@@ -1167,7 +1167,7 @@ fn fuzzRun(seed: u64, steps: usize, trace: bool) !bool {
r.p.update(.{ .resize = .{ .cols = cols, .rows = rows, .cell_pixels = .{ .w = 1 + rng.uintLessThan(u16, 30), .h = 1 + rng.uintLessThan(u16, 60) } } });
r.drain();
},
- 1 => r.pane(0).resizeGrid(1 + rng.uintLessThan(u16, 120), 1 + rng.uintLessThan(u16, 40)),
+ 1 => r.pane(0).resizeGrid(0, 1 + rng.uintLessThan(u16, 120), 1 + rng.uintLessThan(u16, 40)),
2, 3 => {
const drawn = try r.places();
if (trace) std.debug.print(" {d} places, {d} placements, {d} images\n", .{ drawn.len, r.placementCount(0), r.storage(0).images.count() });
@@ -1224,7 +1224,7 @@ test "kitty: scrolled back by pardes, an image shows on its row; scrolled forwar
r.feed(0, &nl);
try std.testing.expectEqual(@as(usize, 0), (try r.placesOf(20)).len);
// Back to the top of the history: the marker row is the body's first.
- pardes.Term.scroll(pane.terminal.?, -1000);
+ pane.scrollBy(-1000);
const o = r.origin(0);
const drawn = try r.placesOf(20);
try std.testing.expectEqual(@as(usize, 1), drawn.len);