summaryrefslogtreecommitdiff
path: root/src/Term.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/Term.zig')
-rw-r--r--src/Term.zig16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Term.zig b/src/Term.zig
index 160ed01e..6c9bd4e3 100644
--- a/src/Term.zig
+++ b/src/Term.zig
@@ -7,6 +7,7 @@
//! the one place Phase 1 turns into the module's registration).
const std = @import("std");
const terminal = @import("term/terminal.zig");
+const pager = @import("term/pager.zig");
/// A terminal pane's emulator, its parse and what pardes keeps beside it.
pub const State = terminal.State;
@@ -195,3 +196,18 @@ pub const Rows = struct {
text: []const u8,
rows: [][]const u8,
};
+
+// ---- the pager ----
+
+/// A program's output, as a terminal reads it, paged (`pardes -`, a
+/// /pager write): its printed text and its SGR colours as spans over it
+/// (`Page`), every other control dropped. The emulator's own parse, so a
+/// +Pager pages what a terminal pane would print.
+pub const page = pager.parse;
+pub const Page = pager.Page;
+/// Bytes `start..end` of a page's text, drawn in `style`.
+pub const Span = pager.Span;
+
+test {
+ _ = pager;
+}