From d309007ec0373df6a44902e4e0a34721a2bdb729 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 4 Mar 2023 14:17:12 -0800 Subject: [PATCH] fix mouse position recording for x10 format I don't know when this broke since I swear this was working before... --- src/Surface.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Surface.zig b/src/Surface.zig index 202f398d2..a4b746fec 100644 --- a/src/Surface.zig +++ b/src/Surface.zig @@ -1165,9 +1165,9 @@ fn mouseReport( return; } - // + 1 below is because our x/y is 0-indexed and proto wants 1 + // + 1 below is because our x/y is 0-indexed and the protocol wants 1 var data: termio.Message.WriteReq.Small.Array = undefined; - assert(data.len >= 5); + assert(data.len >= 6); data[0] = '\x1b'; data[1] = '['; data[2] = 'M'; @@ -1179,7 +1179,7 @@ fn mouseReport( _ = self.io_thread.mailbox.push(.{ .write_small = .{ .data = data, - .len = 5, + .len = 6, }, }, .{ .forever = {} }); },