diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-18 18:58:42 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-18 19:13:22 -0300 |
| commit | 39ce335d7ca06b8095be2d953c240bac354868e5 (patch) | |
| tree | 8cc8e543ac30f1e57dd0814fea2451a5219e9a81 /src/draw.zig | |
| parent | 0d870b0f8f2cbbfbc4827dce39b60f367fc97363 (diff) | |
| download | pardes-39ce335d7ca06b8095be2d953c240bac354868e5.tar.gz pardes-39ce335d7ca06b8095be2d953c240bac354868e5.zip | |
replicas: the PDF back in the soak (docs/design.pdf, --pdf from the build), opened at the start beside the picture and used by the session's typist and every client: its keys, the wheel over it (a glide), a search (`/`, a pattern, Enter: the kind's rows and its jobs), a sweep of B1 over it (a selection), a jump by address (`Look file.pdf:3`, `:1:1`, a hit), Del and Look again; each client keeps the kinds it caught breaking PA_PLAIN as its own process does (Proc swaps Addon.distrusted: shared, one client's catch left every other without the kind's code at its next join, never to run it again); and draw.zig gives a kind's pane whose body has no rows no thumb (the soak's session squeezed its PDF to its tag: '@intFromFloat' out of bounds on a track of 0 rows, a panic in Debug); replicas, five clients, 4 seeds, rtt 30/80/207: diverged 0, unequal 0, deltas checked/wrong 1725/0, 1609/0, 1725/0, quiet checks 457/0, 665/0, 757/0, the PDF's panes the session opened 5/4/5; in one seed at rtt 80 the clients' calls into the PDF: key 617 replayed and 497 speculated, mouse 27/37, view 638, tick 929/465, job_done 88, search 12, address 8, ctl 7
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'src/draw.zig')
| -rw-r--r-- | src/draw.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/draw.zig b/src/draw.zig index 187f2f4e..dbc7069d 100644 --- a/src/draw.zig +++ b/src/draw.zig @@ -450,7 +450,8 @@ fn renderPane(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, r: s.fill(rail.rect.x, rail.rect.y, 1, rail.rect.h, .{ .bg = .{ .rgb = chrome.scroll_track } }); s.fill(rail.rect.x + 1, rail.rect.y, 1, rail.rect.h, .{ .bg = pane_bg }); const k = pane.addon.?; - if (k.thumb_span > 0) { + // (a body of no rows has no thumb: a pane squeezed to its tag) + if (k.thumb_span > 0 and rail.rect.h > 0) { const track: f32 = @floatFromInt(rail.rect.h); rail.thumb_y = @intFromFloat(@min(track - 1, @floor(k.thumb_at * track))); rail.thumb_h = @intFromFloat(@min(track - @as(f32, @floatFromInt(rail.thumb_y)), @max(1, k.thumb_span * track))); |
