ref(event): remove .resize and replace with recursize method calls
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 40s
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 40s
This also means that currently the dynamic resizing through the app's detached thread is not working, as it cannot send size updates. The examples have been overhauled to still implement intermediate mode applications accordingly.
This commit is contained in:
@@ -29,9 +29,12 @@ pub const Buffered = struct {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn resize(this: *@This(), size: Point) !void {
|
||||
pub fn resize(this: *@This()) !void {
|
||||
const size = terminal.getTerminalSize();
|
||||
if (std.meta.eql(this.size, size)) return;
|
||||
|
||||
this.size = size;
|
||||
const n = @as(usize, size.x) * @as(usize, size.y);
|
||||
const n = @as(usize, this.size.x) * @as(usize, this.size.y);
|
||||
|
||||
if (!this.created) {
|
||||
this.screen = this.allocator.alloc(Cell, n) catch @panic("render.zig: Out of memory.");
|
||||
|
||||
Reference in New Issue
Block a user