diff options
Diffstat (limited to 'src/builtins.zig')
| -rw-r--r-- | src/builtins.zig | 12 |
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 |
