╭ changed ────────────╮ │src/ui/Repo/Files.zig│ ╰─────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────╮ │41 // pane shows a placeholder rather than its bytes. │ │42 is_binary: bool = false, │ │43 // the line index this window starts at (0 = the first window). non-zero only│ │44 - // for the route's selected file, paginated by the url's `after`. │ │44 + // for the route's selected file, paginated by the url's `start`. │ │45 window_start: usize = 0, │ │46 // whether more lines exist after this window. │ │47 has_more: bool = false, │ ╰─────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────╮ │80 requested_ref_or_oid: ?ui.RoutablePage.RefOrOid,│ │81 requested_value: []const u8, │ │82 path: []const u8, │ │83 - after: usize, │ │83 + start: usize, │ │84 ) !Self { │ │85 const aa = arena.allocator(); │ │86 │ ╰────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │150 // only the route's selected file paginates; the rest show │ │151 // their first window (for the in-page detail when selected). │ │152 const is_selected = if (selected_file) |sf| std.mem.eql(u8, sf, name) else false; │ │153 - const window_start = if (is_selected) after else 0; │ │153 + const window_start = if (is_selected) start else 0; │ │154 const content = readFileContent(repo_kind, repo_opts, state, io, gpa, aa, file_path, tree_entry, window_start) catch│ │155 FileContent{ .lines = &.{} }; │ │156 entry.lines = content.lines; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────╮ │453 if (self.box.getFocus().children.contains(g)) { │ │454 var buf: [ui.RoutablePage.repo_route_max_len]u8 = undefined;│ │455 var sel_path = self.data.dir; │ │456 - var sel_after: usize = 0; │ │456 + var sel_start: usize = 0; │ │457 if (self.selectedEntry()) |entry| { │ │458 if (!entry.is_dir) { │ │459 sel_path = if (self.data.dir.len == 0) │ ╰─────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │460 entry.name │ │461 else │ │462 std.fmt.bufPrint(&buf, "{s}/{s}", .{ self.data.dir, entry.name }) catch self.data.dir; │ │463 - sel_after = entry.window_start; │ │463 + sel_start = entry.window_start; │ │464 } │ │465 } │ │466 - if (ui.RoutablePage.repoFilesRoute(self.data.identity, self.data.ref_or_oid, self.data.ref_or_oid_value, sel_path, sel_after)) |route|│ │466 + if (ui.RoutablePage.repoFilesRoute(self.data.identity, self.data.ref_or_oid, self.data.ref_or_oid_value, sel_path, sel_start)) |route|│ │467 self.session.data.current_page = route; │ │468 } │ │469 } │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │571 } │ │572 │ │573 // a focusable "next" link above the content. it's an `a:` link to the │ │574 - // selected file at `target_after`, so activating it (the host follows the │ │574 + // selected file at `target_start`, so activating it (the host follows the │ │575 // link) reloads the page on the next window. │ │576 - fn addNavLink(self: *View, allocator: std.mem.Allocator, box: *wgt.Box(ui.Widget), label: []const u8, entry: Entry, target_after: usize) !void { │ │576 + fn addNavLink(self: *View, allocator: std.mem.Allocator, box: *wgt.Box(ui.Widget), label: []const u8, entry: Entry, target_start: usize) !void { │ │577 const page_arena = self.session.page_arena; │ │578 const path = try childDir(page_arena.allocator(), self.data.dir, entry.name); │ │579 - const route = ui.RoutablePage.repoFilesRoute(self.data.identity, self.data.ref_or_oid, self.data.ref_or_oid_value, path, target_after) orelse return error.RouteTooLong;│ │579 + const route = ui.RoutablePage.repoFilesRoute(self.data.identity, self.data.ref_or_oid, self.data.ref_or_oid_value, path, target_start) orelse return error.RouteTooLong;│ │580 const link = try std.fmt.allocPrint(page_arena.allocator(), "a:{s}", .{try route.urlAlloc(page_arena)}); │ │581 var tb = try wgt.TextBox(ui.Widget).init(allocator, label, .{ .border_style = .hidden, .rounded_corners = true, .wrap_kind = .none }); │ │582 errdefer tb.deinit(allocator); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯