Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions examples/table.zig
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ pub fn main() !void {

// Users set up below the main function
const users_buf = try alloc.dupe(User, users[0..]);
defer alloc.free(users_buf);

var buffer: [1024]u8 = undefined;
var tty = try vaxis.Tty.init(&buffer);
Expand All @@ -34,7 +35,6 @@ pub fn main() !void {
var loop: vaxis.Loop(union(enum) {
key_press: vaxis.Key,
winsize: vaxis.Winsize,
table_upd,
}) = .{ .tty = &tty, .vaxis = &vx };
try loop.init();
try loop.start();
Expand Down Expand Up @@ -187,7 +187,6 @@ pub fn main() !void {
moving = false;
},
.winsize => |ws| try vx.resize(alloc, tty.writer(), ws),
else => {},
}

// Content
Expand Down Expand Up @@ -237,7 +236,6 @@ pub fn main() !void {
return see_win.height;
}
}.see;
loop.postEvent(.table_upd);
}

// Sections
Expand Down