From 86322db991e6a1f23be4bcec0a282fce235028d3 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 3 Jun 2024 14:25:37 -0700 Subject: [PATCH] terminal: point coord y needs to be a larger int See comment. --- src/terminal/point.zig | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/terminal/point.zig b/src/terminal/point.zig index 45aa28dea..04eb6b10c 100644 --- a/src/terminal/point.zig +++ b/src/terminal/point.zig @@ -66,8 +66,14 @@ pub const Point = union(Tag) { }; pub const Coordinate = struct { + /// x can use size.CellCountInt because the number of columns + /// can't ever be more than a valid number of columns in a Page. x: size.CellCountInt = 0, - y: size.CellCountInt = 0, + + /// y does not use size.CellCountInt because certain coordinate + /// usage such as screen/history can have more rows than are possible + /// in a single page. + y: u32 = 0, pub fn eql(self: Coordinate, other: Coordinate) bool { return self.x == other.x and self.y == other.y;