From fd882c67cc3d95e9cc7fd837f33fbd0ef64017c4 Mon Sep 17 00:00:00 2001 From: Alex Bennett Date: Mon, 8 Jun 2026 16:50:41 +0800 Subject: [PATCH] pr review: added saturated arithmetic --- src/Surface.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Surface.zig b/src/Surface.zig index 2ce7af852..c56c9791c 100644 --- a/src/Surface.zig +++ b/src/Surface.zig @@ -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(