summaryrefslogtreecommitdiff
path: root/src/mini.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-06 12:56:32 -0300
committerGabriel Schneider <[email protected]>2026-11-06 14:56:36 -0300
commitd78fa4f9d90437dac60d9150e3a6eca868895856 (patch)
tree69e8cb2f47960307bc39296b76fc3b6fdd64a647 /src/mini.zig
parent34a80c9f9b81b64d095a1d5123ae74a52bef4749 (diff)
downloadpardes-d78fa4f9d90437dac60d9150e3a6eca868895856.tar.gz
pardes-d78fa4f9d90437dac60d9150e3a6eca868895856.zip
idioms #18, std.Io's names and fewer forms: the core's path functions are std.Io.Dir.path's and max_path_bytes std.Io.Dir's (std.fs's are deprecated aliases), pinOf takes the *const PageList it is always given, normal's @hasDecl guard goes (@field says the same), deleteSelection returns edit.Error, and a Look miss too long for its buffer is said cut where it said `no match`
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/mini.zig')
-rw-r--r--src/mini.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mini.zig b/src/mini.zig
index 91870674..14b7d973 100644
--- a/src/mini.zig
+++ b/src/mini.zig
@@ -171,8 +171,8 @@ pub fn open(p: *Pardes, id: usize, argument: []const u8) !void {
return;
}
const free = p.freeSlot() orelse return error.NoPaneSlots;
- const dir = std.fs.path.dirname(source) orelse "/";
- const path = try std.fmt.allocPrint(p.gpa, "{s}/Mini {s}", .{ std.mem.trimEnd(u8, dir, "/"), std.fs.path.basename(source) });
+ const dir = std.Io.Dir.path.dirname(source) orelse "/";
+ const path = try std.fmt.allocPrint(p.gpa, "{s}/Mini {s}", .{ std.mem.trimEnd(u8, dir, "/"), std.Io.Dir.path.basename(source) });
errdefer p.gpa.free(path);
const history = try File.History.create(p.gpa);
errdefer p.gpa.destroy(history);