╭ changed ──────╮ │src/ui/Fork.zig│ ╰───────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────╮ │119 const files_line: usize = switch (route) { │ │120 .fork_files => |f| f.line, │ │121 else => 0, │ │122 + }; │ │123 + const files_find: []const u8 = switch (route) { │ │124 + .fork_files => |*f| f.find.slice(), │ │125 + else => "", │ │126 }; │ │127 const commits_content: ui.RoutablePage.RepoCommitsRoute.Content = switch (route) {│ │128 .fork_commits => |c| c.content, │ ╰───────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │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 }; │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────╯