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.zig13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/term/pager.zig b/src/term/pager.zig
index c4dbf721..0cf2ee21 100644
--- a/src/term/pager.zig
+++ b/src/term/pager.zig
@@ -6,28 +6,19 @@
//! of the pane only: no 9P file reads them (File.recolorSyntax draws them).
const std = @import("std");
const plain = @import("plain");
-const pardes = @import("../pardes.zig");
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.