pr review: added saturated arithmetic

This commit is contained in:
Alex Bennett
2026-06-08 16:50:41 +08:00
parent 97777cf5a3
commit fd882c67cc

View File

@@ -4222,8 +4222,8 @@ fn maybePromptClick(self: *Surface) !bool {
// For the event, we always send a left-click press event.
// This matches what Kitty sends.
const key: u8, const y: u32 = switch (v) {
.absolute => .{ 1, pos_vp.y + 1 },
.relative => .{ 2, pos_vp.y - prompt_pin.y + 1 },
.absolute => .{ 1, pos_vp.y +| 1 },
.relative => .{ 2, pos_vp.y -| prompt_pin.y +| 1 },
};
var data: termio.Message.WriteReq.Small.Array = undefined;
const resp = try std.fmt.bufPrint(