fix: correct param order for mode 2048 response

This commit is contained in:
Tim Culverhouse 2024-06-30 11:53:16 -05:00
parent edaeb17f3d
commit 763d2a14a3

View file

@ -478,10 +478,11 @@ inline fn parseCsi(input: []const u8, text_buf: []u8) Result {
const ps = iter.first();
if (std.mem.eql(u8, "48", ps)) {
// in band window resize
const width_char = iter.next() orelse return null_event;
// CSI 48 ; height ; width ; height_pix ; width_pix t
const height_char = iter.next() orelse return null_event;
const width_pix = iter.next() orelse "0";
const width_char = iter.next() orelse return null_event;
const height_pix = iter.next() orelse "0";
const width_pix = iter.next() orelse "0";
const winsize: Winsize = .{
.rows = std.fmt.parseUnsigned(usize, height_char, 10) catch return null_event,