summaryrefslogtreecommitdiff
path: root/src/ninep/pane.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/ninep/pane.zig')
-rw-r--r--src/ninep/pane.zig2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ninep/pane.zig b/src/ninep/pane.zig
index 49fa46c6..3b982803 100644
--- a/src/ninep/pane.zig
+++ b/src/ninep/pane.zig
@@ -454,7 +454,9 @@ fn readFlag(p: *Pardes, req: Req, on: bool) Reply {
/// The text layer of the page a PDF pane shows (MuPDF's extraction, kept
/// with the page), null for any other pane.
+/// A document's text, read-only: a PDF's text layer, a kind's `body`.
fn pdfText(p: *Pardes, pane: *Pane) ?[]const u8 {
+ if (pane.addon != null) return pardes.Kind.body(pane, p.scratch.allocator()) catch null;
if (comptime !pardes.pdf_enabled) return null;
const pv = pane.pdf orelse return null;
return pv.ensureText(p.pdf_gpa);