use queueWrite helper

This commit is contained in:
Mitchell Hashimoto
2022-05-15 20:30:31 -07:00
parent d5858dd0cd
commit 7d2b722066

View File

@ -363,14 +363,7 @@ fn keyCallback(
};
const win = window.getUserPointer(Window) orelse return;
const req = win.write_req_pool.get() catch unreachable;
const buf = win.write_buf_pool.get() catch unreachable;
buf[0] = c;
win.pty_stream.write(
.{ .req = req },
&[1][]u8{buf[0..1]},
ttyWrite,
) catch unreachable;
win.queueWrite(&[1]u8{c}) catch unreachable;
}
}