fix mouse position recording for x10 format

I don't know when this broke since I swear this was working before...
This commit is contained in:
Mitchell Hashimoto
2023-03-04 14:17:12 -08:00
parent 06035e2f95
commit d309007ec0

View File

@ -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 = {} });
},