summaryrefslogtreecommitdiff
path: root/src/builtins.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-08-02 17:17:35 -0300
committerGabriel Schneider <[email protected]>2026-08-10 09:17:07 -0300
commit5961587b227e5fa097fb033e32c29da08a23fb18 (patch)
tree359883d5531e595d47f75824a77a0c1323973e2e /src/builtins.zig
parent487434a0b55fa7cf479f39481b51da0a7eda79e1 (diff)
downloadpardes-5961587b227e5fa097fb033e32c29da08a23fb18.tar.gz
pardes-5961587b227e5fa097fb033e32c29da08a23fb18.zip
tty/image: big harness + golden coverage pass
Diffstat (limited to 'src/builtins.zig')
-rw-r--r--src/builtins.zig12
1 files changed, 12 insertions, 0 deletions
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