╭ changed ──────────────╮ │src/ui/Repo/Commits.zig│ ╰───────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭───────────────────────────────────────────────────────────────────────╮ │36 // whether `message` is a shortened preview. │ │37 message_truncated: bool = false, │ │38 author: ui.Author = .unknown, │ │39 + stats: ?xit.patch.CommitStats = null, │ │40 hunks: []const Hunk, │ │41 // the hunk index this window starts at (0 = the first window).│ │42 window_start: usize, │ ╰───────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │145 .message = text, │ │146 .message_truncated = truncated, │ │147 .author = try ui.Author.init(admin_moment, arena, md.author orelse ""), │ │148 + .stats = if (repo_kind == .xit) try repo.commitStats(io, gpa, .{ .oid = &commit_object.oid }) else null,│ │149 .hunks = &.{}, │ │150 .window_start = 0, │ │151 .has_prev = false, │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │707 for (inner.children.values()) |*child| child.widget.deinit(allocator); │ │708 inner.children.clearAndFree(allocator); │ │709 inner.getFocus().child_id = null; │ │710 + │ │711 + if (commit.stats) |stats| { │ │712 + const text = try std.fmt.allocPrint(self.session.page_arena.allocator(), "+{d}, -{d}", .{ stats.lines_added, stats.lines_removed }); │ │713 + var tb = try wgt.TextBox.init(allocator, text, .{ .border_style = .single, .rounded_corners = true, .wrap_kind = .none, .label = " lines changed " });│ │714 + errdefer tb.deinit(allocator); │ │715 + tb.getFocus().mode = .all; │ │716 + try inner.children.put(allocator, tb.getFocus().id, .{ .widget = .{ .text_box = tb }, .rect = null, .min_size = null }); │ │717 + } │ │718 │ │719 switch (self.paneContent(sel)) { │ │720 .message => { │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯