summaryrefslogtreecommitdiff
path: root/src/pager.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-05 11:21:15 -0300
committerGabriel Schneider <[email protected]>2026-11-05 12:41:12 -0300
commitcfd2b993feda1b3f7474225bb32db8cac8edc5ae (patch)
tree3248246c043fd1865e74adb979a9cb555f918cd6 /src/pager.zig
parentc0b2e5d9194ce35b9fbb58d8d6e18de66cb209a8 (diff)
downloadpardes-cfd2b993feda1b3f7474225bb32db8cac8edc5ae.tar.gz
pardes-cfd2b993feda1b3f7474225bb32db8cac8edc5ae.zip
targets: the ESP32-P4 board port goes (src/esp32p4*.zig and src/esp32p4/, -Dplatform=esp32p4 with its pinned riscv32 target, -Desp32p4-cols and -rows, the Peek, Poke, Hexdump and Gpio words and the Board behind them, the board's 9P engine options, the gpio_toggle host slot), and with it every guard and limit only the board needed: terminal_panes and terminal.enabled (ghostty is in every build), memory.limits' board branching (the desktop values stay), MAX_PANES 64 and MAX_COLS 16 fixed, the board's boot buffer and its embedded boot, the pager's and the terminal's emulator-less paths; tests: the board's GPIO, ring and Board ones go, the boot-OOM and transition-grid ones stay under their own names; the perf harness loses the board's fixture, so the Debug baselines of both frontends are recorded again (--only medium --reps 10)
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/pager.zig')
-rw-r--r--src/pager.zig7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/pager.zig b/src/pager.zig
index ed3b9c35..9102fb84 100644
--- a/src/pager.zig
+++ b/src/pager.zig
@@ -7,7 +7,7 @@
const std = @import("std");
const pardes = @import("pardes.zig");
const CellStyle = @import("surface.zig").CellStyle;
-const ghostty_vt = if (pardes.terminal_panes) @import("ghostty-vt") else struct {};
+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),
@@ -31,9 +31,6 @@ pub const Page = struct {
/// `raw`, a program's output for a terminal, as text and, `colour` on
/// (PagerColor), its spans. Both are `gpa`'s.
pub fn parse(gpa: std.mem.Allocator, raw: []const u8, colour: bool) !Page {
- // ponytail: no ghostty-vt on esp32p4 (no terminal panes, no PAGER):
- // the text is taken as sent.
- if (comptime !pardes.terminal_panes) return .{ .text = try gpa.dupe(u8, raw), .spans = &.{} };
var h: Handler = .{ .gpa = gpa, .colour = colour };
errdefer h.text.deinit(gpa);
errdefer h.spans.deinit(gpa);
@@ -252,7 +249,6 @@ const testing = std.testing;
/// The text `raw` pages to, and its spans as `text[start..end]=style` lines.
fn expectPage(raw: []const u8, text: []const u8, spans: []const struct { []const u8, CellStyle }) !void {
- if (comptime !pardes.terminal_panes) return error.SkipZigTest;
const page = try parse(testing.allocator, raw, true);
defer page.deinit(testing.allocator);
try testing.expectEqualStrings(text, page.text);
@@ -355,7 +351,6 @@ test "bytes that are not UTF-8 page as U+FFFD, the text around them kept" {
}
test "PagerColor off: the same text, no spans, overstrike included" {
- if (comptime !pardes.terminal_panes) return error.SkipZigTest;
const page = try parse(testing.allocator, "\x1b[31mred\x1b[m N\x08N\n", false);
defer page.deinit(testing.allocator);
try testing.expectEqualStrings("red N\n", page.text);