Skip to content

v0.1.7

Latest

Choose a tag to compare

@meszmate meszmate released this 13 Oct 14:50
15db0f7

First release since v0.1.6, collecting 2 changes.

Features

  • Zig 0.17 is supported alongside 0.16 (#160). CI builds and tests both on Linux, macOS and Windows. zig fmt is run with 0.16, because 0.17's fmt rewrites @intFromEnum/@enumFromInt into builtins that 0.16 doesn't have.
  • Program(Model).initWithModel and Harness(Model).initWithModel set the model's initial fields, such as a database pool, before start(). Model.init still runs and sees them (#161, #162).
  • Modal.withBody(body) returns a copy of the modal with a per-frame body. Call it from view() when the body is built from ctx.allocator (#162).

Fixes

  • RichLog inside a Modal no longer reads freed frame memory. RichLog.view now takes *const RichLog, so it can be called from view() without @constCast. Follow mode always shows the tail, including after setSize (#158, #162).
  • Modal body lines keep the body style after embedded \x1b[0m resets, so pre-styled content no longer drops content_bg (#162).
  • Program.deinit only calls Model.deinit after Model.init has run. Before, a failed start() handed it an undefined model (#162).

Docs

  • REFERENCE.md covers withBody, allocator lifetimes and passing data into the model (#162).