╭ changed ──────╮ │src/ui/Repo.zig│ ╰───────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────╮ │ 99 .repo_commits => |*c| c.base_oid.slice(), │ │100 else => "", │ │101 }; │ │102 + const commits_search: []const u8 = switch (route) { │ │103 + .repo_commits => |*c| c.search.slice(), │ │104 + else => "", │ │105 + }; │ │106 + const commits_from: []const u8 = switch (route) { │ │107 + .repo_commits => |*c| c.from.slice(), │ │108 + else => "", │ │109 + }; │ │110 // the refs tab windows one column at a time: `refs_from` (a url-encoded │ │111 // ref name) roots `refs_kind`'s column, the other stays at its first window.│ │112 const refs_kind: ui.RoutablePage.RefKind = switch (route) { │ ╰──────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │267 else if (patchrev_id.len != 0) diff: { │ │268 const diff_route = ui.RoutablePage.repoPatchRevDiffRoute(repo_identity.identity, patchrev_id, 0, "") orelse return error.RouteTooLong; │ │269 break :diff .{ .diff = try Diff.init(repo_kind, opened.self_repo_opts, arena, opened, io, gpa, diff_route.repo_diff) }; │ │262 - } else .{ .commits = try Commits.init(repo_kind, opened.self_repo_opts, arena, opened, io, gpa, session.haxy_moment, location, requested_ref_or_oid, requested_ref_value, commits_content, commits_base_oid) }; │ │270 + } else .{ .commits = try Commits.init(repo_kind, opened.self_repo_opts, arena, opened, io, gpa, session.haxy_moment, location, requested_ref_or_oid, requested_ref_value, commits_content, commits_base_oid, commits_search, commits_from) };│ │271 const target_branch = if (files_data.ref_or_oid == .branch) files_data.ref_or_oid_value else ""; │ │272 break :blk .{ │ │273 files_data, │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │418 │ │419 var self = View{ .box = box }; │ │420 // a page opens on its tabs, except that search results open in the │ │413 - // files tab's search box. │ │414 - self.getFocus().child_id = box.children.keys()[if (data.files.find != null) stack_index else header_index]; │ │421 + // tab's own search box. │ │422 + const results = data.files.find != null or (data.changes == .commits and data.changes.commits.search != null);│ │423 + self.getFocus().child_id = box.children.keys()[if (results) stack_index else header_index]; │ │424 return self; │ │425 } │ │426 │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │471 .repo_header => { │ │472 if (stack.getSelected()) |selected_widget| switch (selected_widget.*) {│ │473 .repo_files => |*v| if (v.focusHeader(root_focus)) return, │ │465 - .repo_commits => |*v| if (v.focusCloneUrl(root_focus)) return, │ │474 + .repo_commits => |*v| if (v.focusHeader(root_focus)) return, │ │475 else => {}, │ │476 }; │ │477 index = stack_index; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────╯