fix(widget): respect size for RawText and Spacer Widgets
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 36s

This commit is contained in:
2024-11-10 16:02:49 +01:00
parent a201f2b653
commit 8ae9129403
4 changed files with 15 additions and 24 deletions

View File

@@ -43,9 +43,9 @@ pub fn Buffered(comptime fullscreen: bool) type {
pub fn Plain(comptime _: bool) type {
return struct {
pub fn clear(this: @This(), anchor: Position, size: Size) !void {
pub fn clear(this: @This(), size: Size) !void {
_ = this;
_ = size;
const anchor = size.anchor;
// NOTE: clear entire screen for the first content (derived from the anchor being at the very left-top)
if (anchor.col == 1 and anchor.row == 1) {
try terminal.clearScreen();