╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ──────╮ │src/ui/Fork.zig│ ╰───────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │132 .identity = identity.identity, │ │133 .id = &id_hex, │ │134 } }; │ │131 - const files = try Files.init(.xit, .{}, arena, &fork_repo, io, arena.child_allocator, location, requested_ref, requested_value, files_path, files_line); │ │135 + const files = try Files.init(.xit, .{}, arena, &fork_repo, io, arena.child_allocator, location, requested_ref, requested_value, files_path, files_line, files_find); │ │136 var commits = try Commits.init(.xit, .{}, arena, &fork_repo, io, arena.child_allocator, haxy_moment, location, requested_ref, requested_value, commits_content, &commits_base_oid);│ │137 commits.commit_count = if (newest_revision) |revision| revision.record.commit_count else 0; │ │138 const diff_start: usize = switch (route) { │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │213 } │ │214 try box.children.put(allocator, stack.getFocus().id, .{ .widget = .{ .stack = stack }, .rect = null, .min_size = null });│ │215 } │ │212 - box.getFocus().child_id = box.children.keys()[header_index]; │ │216 + // a page opens on its tabs, except that search results open in the │ │217 + // files tab's search box. │ │218 + box.getFocus().child_id = box.children.keys()[if (data.files.find != null) stack_index else header_index]; │ │219 return .{ .box = box }; │ │220 } │ │221 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────╮ │249 .fork_header => { │ │250 if (stack.getSelected()) |selected| switch (selected.*) { │ │251 .repo_patch_detail => |*view| if (view.focusFirst(root_focus)) return,│ │246 - .repo_files => |*view| if (view.focusCloneUrl(root_focus)) return, │ │252 + .repo_files => |*view| if (view.focusHeader(root_focus)) return, │ │253 .repo_commits => |*view| if (view.focusCloneUrl(root_focus)) return, │ │254 else => {}, │ │255 }; │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──────╮ │src/ui/Repo.zig│ ╰───────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────╮ │84 const files_line = switch (route) { │ │85 .repo_files => |f| f.line, │ │86 else => 0, │ │87 + }; │ │88 + const files_find: []const u8 = switch (route) { │ │89 + .repo_files => |*f| f.find.slice(), │ │90 + else => "", │ │91 }; │ │92 // what the commits view's pane shows for the commit it walks from: a diff│ │93 // window (with the file it's filtered to) or that commit's message. │ ╰──────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │253 const files_data = if (patchrev_id.len != 0) │ │254 try Files.initPatchRev(repo_kind, opened.self_repo_opts, arena, opened, io, gpa, location, patchrev_id, files_dir, files_line) │ │255 else │ │252 - try Files.init(repo_kind, opened.self_repo_opts, arena, opened, io, gpa, location, requested_ref_or_oid, requested_ref_value, files_dir, files_line); │ │256 + try Files.init(repo_kind, opened.self_repo_opts, arena, opened, io, gpa, location, requested_ref_or_oid, requested_ref_value, files_dir, files_line, files_find);│ │257 const changes_data: Changes = if (route == .repo_diff) │ │258 .{ .diff = try Diff.init(repo_kind, opened.self_repo_opts, arena, opened, io, gpa, route.repo_diff) } │ │259 else if (patchrev_id.len != 0) diff: { │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │409 } │ │410 │ │411 var self = View{ .box = box }; │ │408 - self.getFocus().child_id = box.children.keys()[header_index]; │ │412 + // 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];│ │415 return self; │ │416 } │ │417 │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │461 switch (child.*) { │ │462 .repo_header => { │ │463 if (stack.getSelected()) |selected_widget| switch (selected_widget.*) {│ │458 - .repo_files => |*v| if (v.focusCloneUrl(root_focus)) return, │ │464 + .repo_files => |*v| if (v.focusHeader(root_focus)) return, │ │465 .repo_commits => |*v| if (v.focusCloneUrl(root_focus)) return, │ │466 else => {}, │ │467 }; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──────────────╮ │src/ui/Repo/Commits.zig│ ╰───────────────────────╯ ╭─────────────────────────────────────────────────────────────╮ │45 next_start: ?[]const u8, │ │46 // what the pane shows for the commit the log walks from.│ │47 content: Content = .{ .diff = .{} }, │ │48 -// the ref banner shown above the log. │ │49 -header: Header, │ │48 │ │49 const Self = @This(); │ │50 │ ╰─────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────╮ │167 .commits = try aa.dupe(Commit, buf[0..count]), │ │168 .next_start = next_start, │ │169 .content = try pageContent(aa, content), │ │172 - .header = try Header.init(aa, resolved.ref_or_oid, resolved.value),│ │170 }; │ │171 } │ │172 │ ╰────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────╮ │181 .commits = &.{}, │ │182 .next_start = null, │ │183 .content = try pageContent(aa, content), │ │187 - .header = try Header.init(aa, ref_or_oid, value),│ │184 }; │ │185 } │ │186 │ ╰──────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯