3 Commits

Author SHA1 Message Date
28afdc0ff9 mod: bump to version 0.0.3
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 55s
Release Zig Application / Release zig project (release) Successful in 1m35s
2025-11-05 22:12:27 +01:00
b228c69ae5 mod: bump zterm dependency
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m7s
2025-11-05 22:10:48 +01:00
489d958ac5 mod: bump zterm dependency; respect scrollbar in calculated size requirement for content
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m19s
2025-11-05 18:47:59 +01:00
2 changed files with 4 additions and 7 deletions

View File

@@ -1,13 +1,13 @@
.{ .{
.name = .tui_website, .name = .tui_website,
// This is a [Semantic Version](https://semver.org/). // This is a [Semantic Version](https://semver.org/).
.version = "0.0.2", .version = "0.0.3",
.fingerprint = 0x93d98a4d9d000e9c, // Changing this has security and trust implications. .fingerprint = 0x93d98a4d9d000e9c, // Changing this has security and trust implications.
.minimum_zig_version = "0.16.0-dev.463+f624191f9", .minimum_zig_version = "0.16.0-dev.463+f624191f9",
.dependencies = .{ .dependencies = .{
.zterm = .{ .zterm = .{
.url = "git+https://gitea.yves-biener.de/yves-biener/zterm#a83e86f8d931bc8df5e6d18405d2cab6cc6375e7", .url = "git+https://gitea.yves-biener.de/yves-biener/zterm#ad32e46bc9fd6d1d9b7a3615979a3b80877c9300",
.hash = "zterm-0.3.0-1xmmEFoJHADThbLfms-pORIdMp0vs-Zw8FHSzZIyH1OJ", .hash = "zterm-0.3.0-1xmmEO8PHABP4tE6BnEZllJTh6Hpza_5C9wS8s2vjwou",
}, },
.zlog = .{ .zlog = .{
.url = "git+https://gitea.yves-biener.de/yves-biener/zlog#f43034cea9a0863e618c3d0a43706ce38c8791cf", .url = "git+https://gitea.yves-biener.de/yves-biener/zlog#f43034cea9a0863e618c3d0a43706ce38c8791cf",

View File

@@ -22,16 +22,13 @@ pub fn Content(App: type) type {
} }
fn minSize(ctx: *anyopaque, size: zterm.Point) zterm.Point { fn minSize(ctx: *anyopaque, size: zterm.Point) zterm.Point {
// TODO what about that initial size? seems wrong!
if (size.x == 0 or size.y == 0) return size;
const this: *const @This() = @ptrCast(@alignCast(ctx)); const this: *const @This() = @ptrCast(@alignCast(ctx));
const text = this.document.content; const text = this.document.content;
var index: usize = 0; var index: usize = 0;
var new_size: zterm.Point = .{ .x = size.x }; var new_size: zterm.Point = .{ .x = size.x };
for (0..text.len) |_| rows: { for (0..text.len) |_| rows: {
for (0..size.x) |_| { for (0..size.x - 1) |_| { // assume that there is one cell reserved for the scrollbar
if (index == text.len) break :rows; if (index == text.len) break :rows;
const cp = text[index]; const cp = text[index];
index += 1; index += 1;