summaryrefslogtreecommitdiff
path: root/src/ninep/cols.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-06 12:40:11 -0300
committerGabriel Schneider <[email protected]>2026-11-06 14:56:36 -0300
commit36a51ddc67d0beb7d9851fb2425cf780a47fed36 (patch)
treed534d3151d836ea7a275e9f118a89f2bbc0d0448 /src/ninep/cols.zig
parent4917ae452a15ff4f32d97d215a99fdcfaab29d61 (diff)
downloadpardes-36a51ddc67d0beb7d9851fb2425cf780a47fed36.tar.gz
pardes-36a51ddc67d0beb7d9851fb2425cf780a47fed36.zip
idioms #10, the 9P tree: every bufPrint that fell back to "" or a placeholder is proven to fit (catch unreachable, its why) or cut its argument to fit, /status, /listeners and the 9P reads that staged on gpa answer ENOMEM rather than read short, acme's pane ctl words and pty's files and signals are stringToEnum switches, a dirent's head and name are staged together or not at all, a repeated log record too long to count is pushed as its own line rather than dropped, and daemonList's set is named
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/ninep/cols.zig')
-rw-r--r--src/ninep/cols.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ninep/cols.zig b/src/ninep/cols.zig
index 74d1f668..7eb08ba9 100644
--- a/src/ninep/cols.zig
+++ b/src/ninep/cols.zig
@@ -31,7 +31,7 @@ pub fn activeColumn(p: *const Pardes) ?usize {
/// keyboard), `empty` or `full`, and its panes' serials, top to bottom;
/// then `active <serial>`: the active column, where pane/new and a look
/// place a pane next (acme's activecol), not always the keyboard's.
-pub fn writeLayout(p: *Pardes, w: *std.Io.Writer) !void {
+pub fn writeLayout(p: *Pardes, w: *std.Io.Writer) std.Io.Writer.Error!void {
const v = p.view();
const active = activeColumn(p);
for (0..p.view().ncol) |c| {
@@ -414,7 +414,7 @@ test "Help and Find at /tagexec act in the session's directory, not the keyboard
for ([_][]const u8{ "Help\n", "Find needle\n" }) |line| {
try testing.expectEqual(tree.Status.ok, th.wr(p, tagexec, line).reply.status);
const made = p.panes[p.view().active].?.file.?.path;
- try testing.expectEqualStrings(session, std.fs.path.dirname(made).?);
+ try testing.expectEqualStrings(session, std.Io.Dir.path.dirname(made).?);
}
}