╭ changed ──────────────╮ │src/ui/Repo/Commits.zig│ ╰───────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────╮ │← previous│ ╰──────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │731 tb.getFocus().mode = .all; │ │732 try inner.children.put(allocator, tb.getFocus().id, .{ .widget = .{ .text_box = tb }, .rect = null, .min_size = null }); │ │733 } │ │734 - if (commit.merge) if (self.data.location.commitsMergeRoute(commit.oid)) |route| { │ │734 + if (commit.merge) if (self.data.handle.location.commitsMergeRoute(commit.oid)) |route| { │ │735 try addLink(allocator, inner, "view commits from this merge", try std.fmt.allocPrint(self.session.page_arena.allocator(), "a:{s}", .{try route.toUrl(self.session.page_arena)}));│ │736 }; │ │737 if (commit.stats) |stats| { │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │750 tb.getFocus().mode = .all; │ │751 try inner.children.put(allocator, tb.getFocus().id, .{ .widget = .{ .text_box = tb }, .rect = null, .min_size = null }); │ │752 } │ │753 - try addLink(allocator, inner, "view files at this commit", try filesObjectLink(self.session.page_arena, self.data.location, commit.oid)); │ │753 + try addLink(allocator, inner, "view files at this commit", try filesObjectLink(self.session.page_arena, self.data.handle.location, commit.oid));│ │754 } │ │755 │ │756 try (Diff{ │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │757 - .route = .{ .commit = .{ .location = self.data.location, .oid = commit.oid, .base_oid = self.data.base_oid } }, │ │757 + .route = .{ .commit = .{ .location = self.data.handle.location, .oid = commit.oid, .base_oid = self.data.base_oid } },│ │758 .path = d.path, │ │759 .window = commit.window, │ │760 }).appendWindow(allocator, self.session, inner); │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │808 if (text.len == 0 and self.data.search == null) return; │ │809 // an object view or a base-bounded list searches the default branch, so the url says so │ │810 const route = if (self.data.default_branch.len != 0) │ │811 - self.data.location.commitsRoute(.branch, self.data.default_branch, 0, "", "") │ │811 + self.data.handle.location.commitsRoute(.branch, self.data.default_branch, 0, "", "") │ │812 else │ │813 - self.data.location.commitsRoute(self.data.ref_or_oid, self.data.ref_or_oid_value, 0, "", self.data.base_oid); │ │813 + self.data.handle.location.commitsRoute(self.data.ref_or_oid, self.data.ref_or_oid_value, 0, "", self.data.base_oid);│ │814 try self.session.navigate((route orelse return).withSearch(text) orelse return); │ │815 } │ │816 │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │884 }; │ │885 │ │886 // the "a:" navigation link for the commits page walking from commit `oid` within │ │887 -// `data.location`, windowing the selected commit's diff from hunk `start`, filtered │ │887 +// `data.handle.location`, windowing the selected commit's diff from hunk `start`, filtered │ │888 // to `path` ("" = every file). │ │889 fn commitsLink(page_arena: *std.heap.ArenaAllocator, data: *const Self, oid: []const u8, start: usize, path: []const u8) ![]const u8 {│ │890 - const route = data.location.commitsRoute(.object, oid, start, path, data.base_oid) orelse return error.RouteTooLong; │ │890 + const route = data.handle.location.commitsRoute(.object, oid, start, path, data.base_oid) orelse return error.RouteTooLong; │ │891 const url = try route.toUrl(page_arena); │ │892 return std.fmt.allocPrint(page_arena.allocator(), "a:{s}", .{url}); │ │893 } │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │896 // its query) and moves `from` along, so the search box survives paging. a fork │ │897 // or an object view roots the page at the commit itself. │ │898 fn pageRoute(data: *const Self, oid: []const u8) ?ui.RoutablePage { │ │899 - if (data.location != .repo or data.ref_or_oid == .object) { │ │900 - return data.location.commitsRoute(.object, oid, 0, "", data.base_oid); │ │899 + if (data.handle.location != .repo or data.ref_or_oid == .object) { │ │900 + return data.handle.location.commitsRoute(.object, oid, 0, "", data.base_oid); │ │901 } │ │902 - const route = data.location.commitsRoute(data.ref_or_oid, data.ref_or_oid_value, 0, "", data.base_oid) orelse return null; │ │902 + const route = data.handle.location.commitsRoute(data.ref_or_oid, data.ref_or_oid_value, 0, "", data.base_oid) orelse return null;│ │903 const paged = route.withFrom(oid) orelse return null; │ │904 return paged.withSearch(data.search orelse return paged); │ │905 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │928 return std.fmt.allocPrint(page_arena.allocator(), "ai:{s}", .{try route.toUrl(page_arena)}); │ │929 } │ │930 const route = (switch (content) { │ │931 - .message => data.location.commitMessageRoute(.object, commit.oid, data.base_oid), │ │932 - .diff => |diff| data.location.commitsRoute(.object, commit.oid, commit.window.start, diff.path, data.base_oid), │ │931 + .message => data.handle.location.commitMessageRoute(.object, commit.oid, data.base_oid), │ │932 + .diff => |diff| data.handle.location.commitsRoute(.object, commit.oid, commit.window.start, diff.path, data.base_oid),│ │933 }) orelse return error.RouteTooLong; │ │934 const url = try route.toUrl(page_arena); │ │935 return std.fmt.allocPrint(page_arena.allocator(), "ai:{s}", .{url}); │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │937 │ │938 // the "a:" link to the page showing `oid`'s message on its own. │ │939 fn messageLink(page_arena: *std.heap.ArenaAllocator, data: *const Self, oid: []const u8) ![]const u8 { │ │940 - const route = data.location.commitMessageRoute(.object, oid, data.base_oid) orelse return error.RouteTooLong; │ │940 + const route = data.handle.location.commitMessageRoute(.object, oid, data.base_oid) orelse return error.RouteTooLong;│ │941 const url = try route.toUrl(page_arena); │ │942 return std.fmt.allocPrint(page_arena.allocator(), "a:{s}", .{url}); │ │943 } │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯