diff options
| author | Mitchell Hashimoto <mitchell.hashimoto@gmail.com> | 2024-08-06 15:03:38 -0700 |
|---|---|---|
| committer | Mitchell Hashimoto <mitchell.hashimoto@gmail.com> | 2024-08-06 15:03:38 -0700 |
| commit | aee68570215c1cf0dc40753b34240dbedcfa47c8 (patch) | |
| tree | 5a29a905634cae4f0762b628165592822e8df41a /src/cli/list_keybinds.zig | |
| parent | d50fa272438786383051dd1e8ab32c1090c814a3 (diff) | |
cli/list-keybinds: fix windows build
Diffstat (limited to 'src/cli/list_keybinds.zig')
| -rw-r--r-- | src/cli/list_keybinds.zig | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/cli/list_keybinds.zig b/src/cli/list_keybinds.zig index 3de5f3dcc..393753335 100644 --- a/src/cli/list_keybinds.zig +++ b/src/cli/list_keybinds.zig @@ -95,8 +95,15 @@ fn prettyPrint(alloc: Allocator, keybinds: Config.Keybinds) !u8 { const writer = buf_writer.writer().any(); const winsize: vaxis.Winsize = switch (builtin.os.tag) { - .windows => .{ .rows = 24, .cols = 120 }, // We use some default, it doesn't really matter - // for what we are doing since wrapping will occur anyways + // We use some default, it doesn't really matter for what + // we're doing because we don't do any wrapping. + .windows => .{ + .rows = 24, + .cols = 120, + .x_pixel = 1024, + .y_pixel = 768, + }, + else => try vaxis.Tty.getWinsize(tty.fd), }; try vx.resize(alloc, tty.anyWriter(), winsize); @@ -120,7 +127,7 @@ fn prettyPrint(alloc: Allocator, keybinds: Config.Keybinds) !u8 { } std.mem.sort(Binding, bindings.items, {}, Binding.lessThan); - // Set up styles for each modifer + // Set up styles for each modifier const super_style: vaxis.Style = .{ .fg = .{ .index = 1 } }; const ctrl_style: vaxis.Style = .{ .fg = .{ .index = 2 } }; const alt_style: vaxis.Style = .{ .fg = .{ .index = 3 } }; |
