summaryrefslogtreecommitdiff
path: root/core/Dir.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/Dir.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/Dir.zig')
-rw-r--r--core/Dir.zig10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/Dir.zig b/core/Dir.zig
index 3c74d704..a82887fb 100644
--- a/core/Dir.zig
+++ b/core/Dir.zig
@@ -184,7 +184,7 @@ pub fn look(p: *Pardes, from: usize, dir: []const u8) void {
const name = (if (std.mem.endsWith(u8, dir, "/"))
p.gpa.dupe(u8, dir)
else
- std.mem.concat(p.gpa, u8, &.{ dir, "/" })) catch |err| return p.reportError(from, "look", err);
+ std.mem.concat(p.gpa, u8, &.{ dir, "/" })) catch |err| return p.reportError(.at(from), "look", err);
for (p.panes, 0..) |slot, i| {
const pane = slot orelse continue;
const f = pane.file orelse continue;
@@ -196,14 +196,14 @@ pub fn look(p: *Pardes, from: usize, dir: []const u8) void {
const what = std.fmt.bufPrint(&said, "look: {s}", .{name[0..@min(name.len, limits.host_path_cap)]}) catch unreachable; // cap and 6 fit
const names = read(p.tape, p.gpa, dir) catch |err| {
p.gpa.free(name);
- return p.reportError(from, what, err);
+ return p.reportError(.at(from), what, err);
};
const free = p.freeSlot() orelse {
p.gpa.free(name);
p.gpa.free(names);
- return p.reportError(from, "look", error.NoPaneSlots);
+ return p.reportError(.at(from), "look", error.NoPaneSlots);
};
- const pane = open(p, free, name, names) catch |err| return p.reportError(from, "look", err);
+ const pane = open(p, free, name, names) catch |err| return p.reportError(.at(from), "look", err);
const failures = p.fs.failures;
layout.placeNew(p, from, from, free, .doc);
// Refused a place: that is the look's one failure.
@@ -240,7 +240,7 @@ pub fn show(p: *Pardes, from: usize, id: usize) void {
var said: [limits.host_path_cap + 16]u8 = undefined;
const name = pane.file.?.path;
const what = std.fmt.bufPrint(&said, "look: {s}", .{name[0..@min(name.len, limits.host_path_cap)]}) catch unreachable; // cap and 6 fit
- refresh(p, id) catch |err| return p.reportError(from, what, err);
+ refresh(p, id) catch |err| return p.reportError(.at(from), what, err);
// Closed while the turn was out: nothing to give the keyboard to.
const now = p.panes[id] orelse return;
if (now.serial == serial) p.view().active = id;