fix tty nextEvent call on Windows

This commit is contained in:
Jonathan Marler 2024-07-20 13:31:43 -06:00 committed by CJ van den Berg
parent 32dc17c087
commit 0e6fa89e44

View file

@ -447,8 +447,12 @@ const Loop = struct {
fn ttyRun(self: *Loop) !void {
switch (builtin.os.tag) {
.windows => {
var parser: vaxis.Parser = .{
.grapheme_data = &self.vaxis.unicode.grapheme_data,
};
const a = self.vaxis.opts.system_clipboard_allocator orelse @panic("no tty allocator");
while (!self.should_quit) {
self.postEvent(try self.tty.nextEvent());
self.postEvent(try self.tty.nextEvent(&parser, a));
}
},
else => {