diff --git a/src/Tty.zig b/src/Tty.zig index 7f43355..248f1b8 100644 --- a/src/Tty.zig +++ b/src/Tty.zig @@ -78,7 +78,9 @@ pub fn deinit(self: *Tty) void { /// stops the run loop pub fn stop(self: *Tty) void { self.should_quit = true; - _ = posix.write(self.fd, ctlseqs.device_status_report) catch {}; +_ = posix.write(self.fd, ctlseqs.device_status_report) catch |err| { + log.err("TTY Stop Error: {}", .{ err }); + }; } /// read input from the tty @@ -88,7 +90,6 @@ pub fn run( loop: *Loop(Event), grapheme_data: *const grapheme.GraphemeData, ) !void { - // get our initial winsize const winsize = try getWinsize(self.fd); if (@hasField(Event, "winsize")) { diff --git a/src/vaxis.zig b/src/vaxis.zig index 1e57c98..192889d 100644 --- a/src/vaxis.zig +++ b/src/vaxis.zig @@ -2,6 +2,7 @@ const std = @import("std"); const builtin = @import("builtin"); const atomic = std.atomic; const base64 = std.base64.standard.Encoder; +const posix = std.posix; pub const Cell = @import("Cell.zig"); pub const Image = @import("Image.zig"); @@ -239,7 +240,7 @@ pub fn Vaxis(comptime T: type) type { pub fn queryTerminal(self: *Self) !void { var tty = self.tty orelse return; - const colorterm = std.posix.getenv("COLORTERM") orelse ""; + const colorterm = posix.getenv("COLORTERM") orelse ""; if (std.mem.eql(u8, colorterm, "truecolor") or std.mem.eql(u8, colorterm, "24bit")) {