╭ changed ──────╮ │src/ui/Repo.zig│ ╰───────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────────────────────────────────────────────────────────────────────────────╮ │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 }; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────╯