From 71a9f04342493325c10b1b9bc122a88d41143782 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Sun, 27 Sep 2026 22:46:26 -0300 Subject: Give the pipe its own fields in Pipe Not a pure move: state moves. Pardes's `pipe_seq` and `pipe_wait` become Pipe.zig's own fields `seq` and `wait`, and Pardes embeds one as `pipe: Pipe = .{}`. pipeRequest reads only the request in flight, so it now takes `pipe: *const Pipe` and the four shells call `core.pipe.pipeRequest(id)` (their Pipe imports go away again); the other pipe functions still need the panes and keep `p: *Pardes`, writing `p.pipe.seq/wait`. Field reads in dump.zig, the shells' tests and two test files follow (`core.pipe_wait` becomes `core.pipe.wait`). No behaviour change. Co-Authored-By: Claude Opus 5.5 --- src/pardes.zig | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/pardes.zig') diff --git a/src/pardes.zig b/src/pardes.zig index 00439a36..97860cfe 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -3746,8 +3746,7 @@ pub const Pardes = struct { col: i32 = 0, } = null, - pipe_seq: u32 = 0, - pipe_wait: ?Pipe.PendingPipe = null, + pipe: Pipe = .{}, fs: filesystem.Namespace = .{}, boot: Boot = .shell, @@ -3958,7 +3957,7 @@ pub const Pardes = struct { if (p.last_dump) |d| gpa.free(d); if (p.custom_theme) |theme_value| std.zon.parse.free(gpa, theme_value); if (p.chord_arg) |a| gpa.free(a); - if (p.pipe_wait) |*wait| wait.deinit(gpa); + if (p.pipe.wait) |*wait| wait.deinit(gpa); p.locations_cache.deinit(p.tree_sitter_gpa); p.fs.deinit(gpa); p.shell_rows.reset(gpa); -- cgit v1.3