diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-05 00:31:38 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-05 01:02:28 -0300 |
| commit | 7d359addc420eca66bd1583d8fd8d6a104986a03 (patch) | |
| tree | 2b8991a9a4e5b9c16a2b7683018d60c7c6985c1e /src/tagline.zig | |
| parent | 96cabca7ebe287692ebdff0dba6bb2897eba9d3e (diff) | |
| download | pardes-7d359addc420eca66bd1583d8fd8d6a104986a03.tar.gz pardes-7d359addc420eca66bd1583d8fd8d6a104986a03.zip | |
panes: a pane's PDF state is its own allocation, `pdf: ?*Pdf.State` (made by openPane with pdf_gpa, freed by deinitPane), as a terminal's is, where every Pane held the State inline, a text file's and a terminal's too: a Pane is 49232 bytes where it was 88936 (the State 39704), and a replica's rollback copy of a pane without a PDF is that much smaller; the dump and the wire change with it, the walk writing the slot as a pointer to a State where it wrote the State in place, so a dump written before this, or a peer of an older build, gives its PDF panes no PDF (the walk notes `Pane.pdf: its kind changed; its default taken`, and dump.ensureKind makes each a terminal); the 97 uses change form only (a `|*x|` capture or a `&` dropped, normal.zig's one among them), applyNormal untouched
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/tagline.zig')
| -rw-r--r-- | src/tagline.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tagline.zig b/src/tagline.zig index 73683c1e..e7194981 100644 --- a/src/tagline.zig +++ b/src/tagline.zig @@ -113,7 +113,7 @@ fn shownDir(arena: std.mem.Allocator, pane: *Pane) ![]const u8 { /// PDF's page, a terminal's directory -- without the space that parts it /// from the tag's own text. It is never stored, and never edited. pub fn pathPrefix(p: *const Pardes, arena: std.mem.Allocator, pane: *Pane) ![]const u8 { - if (comptime pdf_enabled) if (pane.pdf) |*pv| + if (comptime pdf_enabled) if (pane.pdf) |pv| return std.fmt.allocPrint(arena, "{s} [{d}/{d}]", .{ pv.path, pv.page + 1, pv.page_count }); // What is drawn: with no graphics, glyph art whatever `Petscii` says. if (pane.image) |*state| return panes.Image.tagPrefix(arena, state, state.glyph_art or !p.native_images); |
