diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-05 11:21:15 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-05 12:41:12 -0300 |
| commit | cfd2b993feda1b3f7474225bb32db8cac8edc5ae (patch) | |
| tree | 3248246c043fd1865e74adb979a9cb555f918cd6 /src/echo.zig | |
| parent | c0b2e5d9194ce35b9fbb58d8d6e18de66cb209a8 (diff) | |
| download | pardes-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/echo.zig')
| -rw-r--r-- | src/echo.zig | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/echo.zig b/src/echo.zig index e25953e0..e98aff49 100644 --- a/src/echo.zig +++ b/src/echo.zig @@ -149,7 +149,7 @@ pub const Echo = struct { /// it was applied here at once (so it was no key into a terminal). pub fn typed(e: *Echo, c: *Pardes, view: u8, ev: pardes.Event, seq: u32, applied: bool) void { e.view = view; - if (applied or comptime !terminal.enabled) return; + if (applied) return; switch (ev) { // ponytail: a motion or focus report a program asked for could // move its cursor; the judgement catches that. @@ -310,7 +310,6 @@ pub const Echo = struct { } fn screenCell(e: *const Echo, state: *terminal.State, x: u16, row: u64) ?terminal.PageCell { - if (comptime !terminal.enabled) return null; const top = e.tops[e.pane]; if (row < top or row - top >= state.vt.rows) return null; return state.vt.screens.active.pages.getCell(.{ .active = .{ .x = x, .y = @intCast(row - top) } }); @@ -379,7 +378,6 @@ pub const Echo = struct { } fn judge(e: *Echo, c: *Pardes, slack: u64) void { - if (comptime !terminal.enabled) return; if (e.n == 0 and e.cursor == null) return; const now = e.time(); const pane = c.panes[e.pane] orelse return e.drop(); @@ -446,7 +444,6 @@ pub const Echo = struct { /// Over terminal pane `id`'s body, as renderBody drew it: the /// characters predicted and the cursor after them. pub fn paint(e: *const Echo, p: *const Pardes, s: *Surface, pane: *const Pane, id: usize, tx: u16, tw: u16, body_y: u16, body_h: u16, active: bool) void { - if (comptime !terminal.enabled) return; if (e.n == 0 and e.cursor == null) return; if (id != e.pane or pane.serial != e.serial or p.view != e.view or pane.body.mode != .tty) return; if (!e.visible(p)) return; @@ -534,7 +531,6 @@ fn blank(cp: u21) bool { /// since) and the cursor's own, on the primary screen. A shell without /// pardes's marks is trusted only once its echo is confirmed. fn atPrompt(pane: *const Pane) bool { - if (comptime !terminal.enabled) return false; const state = pane.terminal orelse return false; return state.vt.screens.active_key == .primary and state.stream.handler.phase == .input and terminal.promptInputReady(pane); } @@ -655,7 +651,6 @@ const Rig = struct { const prompt = "\x1b]133;A;cl=line;aid=pardes\x07$ \x1b]133;B;aid=pardes\x07"; test "keys typed at a shell's prompt are drawn at once, and the authority's echo takes their place" { - if (comptime !terminal.enabled) return error.SkipZigTest; var g: Rig = undefined; try g.init(); defer g.deinit(); @@ -703,7 +698,6 @@ test "keys typed at a shell's prompt are drawn at once, and the authority's echo } test "a password prompt shows nothing typed, and a full-screen program is not predicted" { - if (comptime !terminal.enabled) return error.SkipZigTest; var g: Rig = undefined; try g.init(); defer g.deinit(); @@ -735,7 +729,6 @@ test "a password prompt shows nothing typed, and a full-screen program is not pr } test "keys still on their way when their predictions go: the next waits for their echo, never predicted where it is about to land" { - if (comptime !terminal.enabled) return error.SkipZigTest; var g: Rig = undefined; try g.init(); defer g.deinit(); @@ -773,7 +766,6 @@ test "keys still on their way when their predictions go: the next waits for thei } test "a misprediction takes every prediction back and shows none until an echo is confirmed; after Tab nothing is predicted until its echo" { - if (comptime !terminal.enabled) return error.SkipZigTest; var g: Rig = undefined; try g.init(); defer g.deinit(); |
