From 5fb32fd8a0d43412cf9375ad5f1fe850f23810ca Mon Sep 17 00:00:00 2001 From: "Jeffrey C. Ollie" Date: Sat, 24 May 2025 11:37:34 -0500 Subject: [PATCH] OSC: add comptime check for size of OSC Command --- src/terminal/osc.zig | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/terminal/osc.zig b/src/terminal/osc.zig index 67f665f1a..63d3e4c6b 100644 --- a/src/terminal/osc.zig +++ b/src/terminal/osc.zig @@ -189,7 +189,7 @@ pub const Command = union(enum) { } }; - pub const List = std.SegmentedList(ColorOperation, 4); + pub const List = std.SegmentedList(ColorOperation, 2); pub const Kind = union(enum) { palette: u8, @@ -213,6 +213,11 @@ pub const Command = union(enum) { indeterminate, pause, }; + + comptime { + assert(@sizeOf(Command) == 64); + // @compileLog(@sizeOf(Command)); + } }; /// The terminator used to end an OSC command. For OSC commands that demand