WIP: container rendering for borders + container element rendering

This commit is contained in:
2025-02-03 19:55:33 +01:00
parent 0bf79dc236
commit 2bfacc0e98
7 changed files with 189 additions and 219 deletions

View File

@@ -3,18 +3,18 @@ const Style = @import("style.zig");
pub const Cell = @This();
style: Style = .{},
rune: u8 = ' ',
style: Style = .{ .attributes = &.{} },
cp: u21 = ' ',
pub fn eql(this: Cell, other: Cell) bool {
return this.rune == other.rune and this.style.eql(other.style);
return this.cp == other.cp and this.style.eql(other.style);
}
pub fn reset(this: *Cell) void {
this.style = .{ .fg = .default, .bg = .default, .ul = .default, .ul_style = .off };
this.rune = ' ';
this.style = .{ .attributes = &.{} };
this.cp = ' ';
}
pub fn value(this: Cell, writer: anytype) !void {
try this.style.value(writer, this.rune);
try this.style.value(writer, this.cp);
}