╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ──────────────╮ │src/ui/Repo/Commits.zig│ ╰───────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────╮ │718 return header_view.input(allocator, key, root_focus); │ │719 } │ │720 if (direction == .up and self.contentAtTop() and self.focusHeader(root_focus)) return;│ │807 - if (self.diffActive()) { │ │808 - const diff_view = &self.diffOuter().children.values()[0].widget.diff_view; │ │809 - if (key == .arrow_left and self.diffScroll().x == 0) { │ │810 - if (!diff_view.moveInRow(root_focus, false)) self.focusList(root_focus); │ │721 + if (self.detailActive()) { │ │722 + const detail_view = &self.detailOuter().children.values()[0].widget.diff_view; │ │723 + if (key == .arrow_left and self.detailScroll().x == 0) { │ │724 + if (!detail_view.moveInRow(root_focus, false)) self.focusList(root_focus); │ │725 } else { │ │812 - try diff_view.input(allocator, key, root_focus); │ │726 + try detail_view.input(allocator, key, root_focus); │ │727 } │ │728 } else { │ │729 try self.listInput(key, root_focus); │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │736 if (text.len == 0 and self.data.search == null) return; │ │737 // an object view or a base-bounded list searches the default branch, so the url says so │ │738 const route = if (self.data.default_branch.len != 0) │ │825 - self.data.handle.location.commitsRoute(.branch, self.data.default_branch, 0, "", "") │ │739 + self.data.handle.location.commitsRoute(.branch, self.data.default_branch, "") │ │740 else │ │827 - self.data.handle.location.commitsRoute(self.data.ref_or_oid, self.data.ref_or_oid_value, 0, "", self.data.base_oid);│ │741 + self.data.handle.location.commitsRoute(self.data.ref_or_oid, self.data.ref_or_oid_value, self.data.base_oid); │ │742 try self.session.navigate((route orelse return).withSearch(text) orelse return); │ │743 } │ │744 │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────╮ │745 fn listInput(self: *View, key: Key, root_focus: *Focus) !void { │ │746 // up/down (and the scroll wheel) move the selection a row; page up/down │ │833 - // jump a fixed amount. right/Enter cross into the diff pane. Enter/clicks │ │747 + // jump a fixed amount. right/Enter cross into the detail pane. Enter/clicks │ │748 // on the "next" row become navigation in the host before reaching here. │ │749 if (inp.rowDelta(key, @intCast(self.listBox().children.count()))) |delta| { │ │750 ui.widget.moveRowFocus(self.listBox(), self.listScroll(), root_focus, delta);│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────╮ │752 } │ │753 switch (key) { │ │754 .enter => if (self.selectedCommitIndex() != null) │ │841 - self.focusDiff(root_focus) │ │755 + self.focusDetail(root_focus) │ │756 else if (self.data.next_start) |next| { │ │757 if (pageRoute(self.data, next)) |route| try self.session.navigate(route);│ │758 }, │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────╮ │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) { │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯