summaryrefslogtreecommitdiff
path: root/src/acmefs.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/acmefs.zig')
-rw-r--r--src/acmefs.zig5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/acmefs.zig b/src/acmefs.zig
index db610f67..35523358 100644
--- a/src/acmefs.zig
+++ b/src/acmefs.zig
@@ -45,6 +45,9 @@ const config = @import("config.zig");
const modal = @import("modal.zig");
const file_pane = @import("file_pane.zig");
const output_pane = @import("output_pane.zig");
+/// only for the scrollback read below: a terminal's `body` is a grid, and
+/// term_pane owns how a grid becomes bytes (and whether there is one at all).
+const term_pane = @import("term_pane.zig");
/// only for `look.readFile`, which is what a `get` verb IS — the same
/// synchronous path-backed read `file_pane.open` does, and the one place this
/// module touches a disk.
@@ -1236,7 +1239,7 @@ fn readBody(p: *Pardes, req: Req, id: usize, pane: *Pane) Reply {
// is a terminal emulator, and its "body" is the scrollback — which only
// becomes bytes when somebody renders the pages into lines. So it is
// produced, staged, and paid for per read. `win`'s transcript, read side.
- const text = pane.vt.screens.active.dumpStringAlloc(p.gpa, .{ .screen = .{} }) catch
+ const text = term_pane.screenTextAlloc(pane, p.gpa) catch
return Reply.fail(req.tag, E.NOMEM);
defer p.gpa.free(text);
const out = p.fs.stage(p.gpa);