╭ changed ──────────────╮ │src/ui/Repo/Commits.zig│ ╰───────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────╮ │← previous│ ╰──────────╯ ╭──────────────────────────────────────────────────────────────╮ │845 - .arrow_right => self.focusDiff(root_focus), │ │759 + .arrow_right => self.focusDetail(root_focus),│ │760 else => {}, │ │761 } │ │762 } │ ╰──────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────╮ │763 │ │850 - // enter the diff pane. the host arrives here on right-arrow or Enter from the │ │851 - // list. a diff with no rows can't be entered. setFocus handles the too-narrow │ │764 + // enter the detail pane. the host arrives here on right-arrow or Enter from the│ │765 + // list. a pane with no rows can't be entered. setFocus handles the too-narrow │ │766 // case where the pane isn't laid out yet (it gets selected, then focused after │ │853 - // the next build, landing on its remembered hunk). │ │854 - fn focusDiff(self: *View, root_focus: *Focus) void { │ │855 - if (self.diffInner().children.count() == 0) return; │ │856 - root_focus.setFocus(self.diffOuter().getFocus().id); │ │767 + // the next build, landing on its remembered row). │ │768 + fn focusDetail(self: *View, root_focus: *Focus) void { │ │769 + if (self.detailInner().children.count() == 0) return; │ │770 + root_focus.setFocus(self.detailOuter().getFocus().id); │ │771 } │ │772 │ │773 // return to the list. │ ╰─────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────╮ │788 } │ │789 │ │790 fn contentAtTop(self: *View) bool { │ │877 - if (self.diffActive()) { │ │878 - const inner = self.diffInner(); │ │791 + if (self.detailActive()) { │ │792 + const inner = self.detailInner(); │ │793 const cid = inner.getFocus().child_id orelse return true; │ │794 const first_focused = inner.children.count() > 0 and cid == inner.children.keys()[0];│ │881 - return first_focused and self.diffScroll().y == 0; │ │795 + return first_focused and self.detailScroll().y == 0; │ │796 } │ │797 const lb = self.listBox(); │ │798 const cid = lb.getFocus().child_id orelse return true; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │813 }; │ │814 │ │815 // the "a:" navigation link for the commits page walking from commit `oid` within │ │902 -// `data.handle.location`, windowing the selected commit's diff from hunk `start`, filtered │ │903 -// to `path` ("" = every file). │ │904 -fn commitsLink(page_arena: *std.heap.ArenaAllocator, data: *const Self, oid: []const u8, start: usize, path: []const u8) ![]const u8 {│ │905 - const route = data.handle.location.commitsRoute(.object, oid, start, path, data.base_oid) orelse return error.RouteTooLong; │ │816 +// `data.handle.location`. │ │817 +fn commitsLink(page_arena: *std.heap.ArenaAllocator, data: *const Self, oid: []const u8) ![]const u8 { │ │818 + const route = data.handle.location.commitsRoute(.object, oid, data.base_oid) orelse return error.RouteTooLong; │ │819 const url = try route.toUrl(page_arena); │ │820 return std.fmt.allocPrint(page_arena.allocator(), "a:{s}", .{url}); │ │821 } │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │825 // or an object view roots the page at the commit itself. │ │826 fn pageRoute(data: *const Self, oid: []const u8) ?ui.RoutablePage { │ │827 if (data.handle.location != .repo or data.ref_or_oid == .object) { │ │915 - return data.handle.location.commitsRoute(.object, oid, 0, "", data.base_oid); │ │828 + return data.handle.location.commitsRoute(.object, oid, data.base_oid); │ │829 } │ │917 - const route = data.handle.location.commitsRoute(data.ref_or_oid, data.ref_or_oid_value, 0, "", data.base_oid) orelse return null;│ │830 + const route = data.handle.location.commitsRoute(data.ref_or_oid, data.ref_or_oid_value, data.base_oid) orelse return null; │ │831 const paged = route.withFrom(oid) orelse return null; │ │832 return paged.withSearch(data.search orelse return paged); │ │833 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │846 return std.fmt.allocPrint(page_arena.allocator(), "a:{s}", .{url}); │ │847 } │ │848 │ │936 -// the in-page "ai:" anchor for selecting a commit with its current pane content │ │937 -// and window. the href is only followed with js off. │ │938 -fn commitRowLink(page_arena: *std.heap.ArenaAllocator, data: *const Self, commit: Commit, content: Content) ![]const u8 {│ │849 +// the in-page "ai:" anchor for selecting a commit, showing its whole message │ │850 +// when `message` is set. the href is only followed with js off. │ │851 +fn commitRowLink(page_arena: *std.heap.ArenaAllocator, data: *const Self, commit: Commit, message: bool) ![]const u8 { │ │852 // a result roots the same results page at its commit, so the query │ │853 // survives following the row │ │854 if (data.search != null) { │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │855 const route = pageRoute(data, commit.oid) orelse return error.RouteTooLong; │ │856 return std.fmt.allocPrint(page_arena.allocator(), "ai:{s}", .{try route.toUrl(page_arena)}); │ │857 } │ │945 - const route = (switch (content) { │ │946 - .message => data.handle.location.commitMessageRoute(.object, commit.oid, data.base_oid), │ │947 - .diff => |diff| data.handle.location.commitsRoute(.object, commit.oid, commit.window.start, diff.path, data.base_oid),│ │948 - }) orelse return error.RouteTooLong; │ │858 + const route = (if (message) │ │859 + data.handle.location.commitMessageRoute(.object, commit.oid, data.base_oid) │ │860 + else │ │861 + data.handle.location.commitsRoute(.object, commit.oid, data.base_oid)) orelse return error.RouteTooLong; │ │862 const url = try route.toUrl(page_arena); │ │863 return std.fmt.allocPrint(page_arena.allocator(), "ai:{s}", .{url}); │ │864 } │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯