From d78fa4f9d90437dac60d9150e3a6eca868895856 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 6 Nov 2026 12:56:32 -0300 Subject: 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 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/panes.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/panes.zig') diff --git a/src/panes.zig b/src/panes.zig index ffaaba37..b9504b1c 100644 --- a/src/panes.zig +++ b/src/panes.zig @@ -925,7 +925,7 @@ pub fn openTutorView(p: *Pardes, id: usize) !*Pane { errdefer p.gpa.free(content); // A generated pane, named as every one is: `+` in the session's // directory, never a bare path Save could write at the root. - const path = try std.fs.path.join(p.gpa, &.{ p.sessionDir(), "+Tutor" }); + const path = try std.Io.Dir.path.join(p.gpa, &.{ p.sessionDir(), "+Tutor" }); errdefer p.gpa.free(path); const history = try panes.File.History.create(p.gpa); errdefer p.gpa.destroy(history); @@ -962,7 +962,7 @@ pub fn paneDir(pane: *const Pane) []const u8 { .none => {}, } if (pane.file) |f| return panes.Dir.ofName(f.path); - if (pane.addon) |k| if (k.path.len > 0) return std.fs.path.dirname(k.path) orelse "/"; + if (pane.addon) |k| if (k.path.len > 0) return std.Io.Dir.path.dirname(k.path) orelse "/"; return pane.cwdSlice(); } -- cgit v1.3