We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 883142d commit fab9e4cCopy full SHA for fab9e4c
lib/std/Progress.zig
@@ -262,6 +262,12 @@ fn determineTerminalWidth(self: *Progress) ?usize {
262
if (exit_code < 0) return null;
263
return @intCast(window_size.ws_col);
264
},
265
+ .macos => {
266
+ var window_size: std.c.winsize = undefined;
267
+ const exit_code = std.c.ioctl(self.terminal.?.handle, std.c.T.IOCGWINSZ, @intFromPtr(&window_size));
268
+ if (exit_code < 0) return null;
269
+ return @intCast(window_size.ws_col);
270
+ },
271
.windows => {
272
std.debug.assert(self.is_windows_terminal);
273
var screen_buffer_info: windows.CONSOLE_SCREEN_BUFFER_INFO = undefined;
0 commit comments