From 5961587b227e5fa097fb033e32c29da08a23fb18 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Sun, 2 Aug 2026 17:17:35 -0300 Subject: tty/image: big harness + golden coverage pass --- src/builtins.zig | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/builtins.zig') diff --git a/src/builtins.zig b/src/builtins.zig index 6a8518ea..578a60dd 100644 --- a/src/builtins.zig +++ b/src/builtins.zig @@ -289,6 +289,18 @@ pub const FontSel = struct { } }; +/// Toggle a native PDF between the reading-oriented fit-width view and the +/// whole-page-height view. Like Font on non-GUI builds, this declaration's +/// `run` deliberately has the wrong shape when MuPDF is disabled: `all()` then +/// omits it entirely, so the enum, Help and runtime binary contain no +/// PdfFit. +pub const PdfFit = struct { + pub const run = if (pardes.pdf_enabled) apply else {}; + fn apply(c: Ctx) void { + c.p.togglePdfFit(c.pane); + } +}; + // The image pane's three renderer toggles. They used to be words the image tag // printed and the execute dispatcher matched by hand; as builtins they are // executable anywhere, pressable under SPC and listed by `SPC ?`, the whole -- cgit v1.3