From fa39f0a067db5e278d1941607f172c2904a25d37 Mon Sep 17 00:00:00 2001 From: Tim Culverhouse Date: Fri, 1 Mar 2024 21:29:16 -0600 Subject: [PATCH] window: saturate size, export Color Signed-off-by: Tim Culverhouse --- src/Window.zig | 4 ++-- src/main.zig | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Window.zig b/src/Window.zig index 46dfbc3..b14b230 100644 --- a/src/Window.zig +++ b/src/Window.zig @@ -48,10 +48,10 @@ pub fn initChild( }, }; const resolved_height = switch (height) { - .expand => self.height - y_off, + .expand => self.height -| y_off, .limit => |h| blk: { if (h + y_off > self.height) { - break :blk self.height - y_off; + break :blk self.height -| y_off; } break :blk h; }, diff --git a/src/main.zig b/src/main.zig index 66a43c5..7d722a4 100644 --- a/src/main.zig +++ b/src/main.zig @@ -9,6 +9,7 @@ pub const Cell = @import("Cell.zig"); pub const Segment = Cell.Segment; pub const PrintOptions = Window.PrintOptions; pub const Style = Cell.Style; +pub const Color = Cell.Color; pub const Image = @import("Image.zig"); pub const Mouse = @import("Mouse.zig"); pub const Winsize = @import("Tty.zig").Winsize;