Skip to content

Commit

Permalink
fix: failure to render UI on macos
Browse files Browse the repository at this point in the history
The system calls and bits were hardcoded to be Linux. At some point in
testing I couldn't get it to work for some reason so I hardcoded Linux
and failed to revert that. Things should work better on macos now, but I
would still like to test things more before stating official support.
  • Loading branch information
natecraddock committed Mar 11, 2022
1 parent d2c7953 commit 9ade195
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ui.zig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const std = @import("std");
const system = std.os.linux;
const system = std.os.system;

const ArrayList = std.ArrayList;
const Candidate = filter.Candidate;
Expand Down Expand Up @@ -111,9 +111,9 @@ pub const Terminal = struct {
};

pub fn windowSize(self: *Terminal) ?WinSize {
var size: std.os.linux.winsize = undefined;
var size: system.winsize = undefined;

if (std.os.linux.ioctl(self.tty.handle, std.os.system.T.IOCGWINSZ, @ptrToInt(&size)) == -1) {
if (system.ioctl(self.tty.handle, system.T.IOCGWINSZ, @ptrToInt(&size)) == -1) {
return null;
}

Expand Down

0 comments on commit 9ade195

Please sign in to comment.