summaryrefslogtreecommitdiff
path: root/core/Kind.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-19 20:31:32 -0300
committerGabriel Schneider <[email protected]>2026-11-19 20:31:32 -0300
commit0db34fbf28e70c8c6a3c6025c0888fc5ec75201c (patch)
treef2e288668decded9276ebc45907f16d651b06f9e /core/Kind.zig
parent2ab05b536bc3b063666b5aaab497157adc2a9120 (diff)
parentbf351b62e8843a3d173cedeefa2dd0b8ef4b4392 (diff)
downloadpardes-0db34fbf28e70c8c6a3c6025c0888fc5ec75201c.tar.gz
pardes-0db34fbf28e70c8c6a3c6025c0888fc5ec75201c.zip
integration: a pane's and a view's slot as types, with the regular-expression fixes and the fixes the real loops asked for: pardes-ids (Pane.Id and View.Id through the entries, the events, the effects, the Host table and the device messages) and pardes-merge21, merged without a textual conflict; one call site written since on the old type follows (core/draw.zig: the twin test's file_changed event, .pane = .at(0)); tui core-test 848/991 (143 skipped), shell-test 1027/1030, the window builds; gates in the coordinator's ledger
Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'core/Kind.zig')
-rw-r--r--core/Kind.zig14
1 files changed, 7 insertions, 7 deletions
diff --git a/core/Kind.zig b/core/Kind.zig
index 13ef8edd..7641c2d1 100644
--- a/core/Kind.zig
+++ b/core/Kind.zig
@@ -278,7 +278,7 @@ pub fn open(p: *Pardes, id: usize, k: u8, path: ?[]const u8, bytes: ?[]const u8)
_ = reopen(p, id, s, bytes);
// Its file watched, as a text's is: changed on disk, it opens again
// from it (fileChanged); retirePane lets the watch go.
- if (s.path.len > 0 and @import("fs.zig").localPath(s.path) != null) p.emit(.{ .watch = .{ .pane = @intCast(id), .on = true } });
+ if (s.path.len > 0 and @import("fs.zig").localPath(s.path) != null) p.emit(.{ .watch = .{ .pane = .at(id), .on = true } });
return pane;
}
@@ -995,7 +995,7 @@ const Call = struct {
for (o.jobs) |token| if (token != 0) {
cl.slot.tokens = token;
};
- if (cl.p) |p| if (p.panes[cl.id]) |pane| for (o.jobs) |token| if (token != 0) p.emit(.{ .job = .{ .pane = @intCast(cl.id), .serial = pane.serial, .token = token } });
+ if (cl.p) |p| if (p.panes[cl.id]) |pane| for (o.jobs) |token| if (token != 0) p.emit(.{ .job = .{ .pane = .at(cl.id), .serial = pane.serial, .token = token } });
for (o.cancels) |token| if (token != 0) {
for (&cl.slot.jobs) |*j| if (j.*) |job| if (job.token == token) {
cl.slot.gpa.free(job.in);
@@ -1013,7 +1013,7 @@ const Call = struct {
return o;
};
const p = cl.p orelse return o;
- if (o.said.len > 0) if (o.err) p.reportFailure(cl.id, o.said) else p.setMessage(cl.id, o.said);
+ if (o.said.len > 0) if (o.err) p.reportFailure(cl.id, o.said) else p.setMessage(.at(cl.id), o.said);
if (o.pane_name.len > 0) textPane(p, cl.id, cl.slot, o.pane_name, o.pane_text);
if (o.look.len > 0) @import("look.zig").lookAt(p, cl.id, o.look);
if (o.exec.len > 0) @import("mouse.zig").dispatchPointerBuiltin(p, cl.id, pardes.config.exec_cmd, o.exec, null);
@@ -1052,8 +1052,8 @@ fn moreFound(p: *Pardes, id: usize, rows: []const u8) void {
const rp = p.panes[pane.search_pane orelse return] orelse return;
const rf = if (rp.file) |*f| f else return;
const o = if (rf.output) |*x| x else return;
- const content = std.mem.concat(p.gpa, u8, &.{ rf.content, rows }) catch |err| return p.reportError(id, "found", err);
- pardes.panes.Output.fillResults(p, id, std.Io.Dir.path.dirname(rf.path) orelse p.sessionDir(), .search, o.arg(), content, null) catch |err| p.reportError(id, "found", err);
+ const content = std.mem.concat(p.gpa, u8, &.{ rf.content, rows }) catch |err| return p.reportError(.at(id), "found", err);
+ pardes.panes.Output.fillResults(p, id, std.Io.Dir.path.dirname(rf.path) orelse p.sessionDir(), .search, o.arg(), content, null) catch |err| p.reportError(.at(id), "found", err);
}
fn same(o: Outcome) Outcome {
@@ -1299,8 +1299,8 @@ pub var seed_base: u64 = 0;
/// kind's pane, a Look of one going to its kind (look.zig lookKind).
fn textPane(p: *Pardes, id: usize, slot: *const Slot, name: []const u8, text: []const u8) void {
const dir = std.Io.Dir.path.dirname(slot.path) orelse p.sessionDir();
- const content = p.gpa.dupe(u8, text) catch |err| return p.reportError(id, name, err);
- pardes.panes.Output.fillResults(p, id, dir, .kind, name, content, null) catch |err| p.reportError(id, name, err);
+ const content = p.gpa.dupe(u8, text) catch |err| return p.reportError(.at(id), name, err);
+ pardes.panes.Output.fillResults(p, id, dir, .kind, name, content, null) catch |err| p.reportError(.at(id), name, err);
}
/// A kind for tests of the core's side of a kind's pane, no library: a