summaryrefslogtreecommitdiff
path: root/src/term/pager.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/term/pager.zig')
-rw-r--r--src/term/pager.zig16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/term/pager.zig b/src/term/pager.zig
index dca57024..0cf2ee21 100644
--- a/src/term/pager.zig
+++ b/src/term/pager.zig
@@ -5,28 +5,20 @@
//! motion, OSC titles and hyperlinks, modes). The spans are display state
//! of the pane only: no 9P file reads them (File.recolorSyntax draws them).
const std = @import("std");
-const pardes = @import("../pardes.zig");
-const CellStyle = @import("../surface.zig").CellStyle;
+const plain = @import("plain");
+const CellStyle = plain.CellStyle;
const ghostty_vt = @import("ghostty-vt");
/// Bytes `start..end` of the text, drawn in `style`. A palette colour stays
/// `.index`, resolved through the theme as it is drawn (terminal.palColor),
/// and `.default` is the pane's own.
-pub const Span = struct { start: u32, end: u32, style: CellStyle };
+pub const Span = plain.term.Span;
/// ponytail: past this many spans the rest of a page is plain, rather than
/// ~100 MB of spans for a 256 MiB coloured log; a packed style if it matters.
pub const max_spans = 4 << 20;
-pub const Page = struct {
- text: []u8,
- spans: []Span,
-
- pub fn deinit(page: Page, gpa: std.mem.Allocator) void {
- gpa.free(page.text);
- gpa.free(page.spans);
- }
-};
+pub const Page = plain.term.Page;
/// `raw`, a program's output for a terminal, as text and its spans. Both
/// are `gpa`'s.