╭ changed ──╮ │src/web.zig│ ╰───────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │609 .both => "overflow:auto", │ │610 }; │ │611 // the id carries a content version so JS preserves the native scroll │ │612 - // position across re-renders of the same content but resets it (to the │ │613 - // top) when the content is replaced — e.g. selecting a different commit. │ │614 - var buf: [160]u8 = undefined; │ │615 - try output.appendSlice(allocator, try std.fmt.bufPrint(&buf, "<div class=\"scroll\" data-scroll-id=\"{d}-{d}\" style=\"left:{d}ch;top:{d}em;width:{d}ch;height:{d}em;{s}\">", .{ id, child.focus.version, r.x, r.y, r.size.width, r.size.height, overflow })); │ │612 + // position across re-renders of the same content but resets it when the │ │613 + // content is replaced — e.g. selecting a different commit. the widget's │ │614 + // scroll offset (in cells) rides along so JS can apply it when it has no │ │615 + // preserved position, letting a wasm-side scrollToRect (the files list │ │616 + // scrolling to its selected row on page load) reach the browser. │ │617 + var buf: [224]u8 = undefined; │ │618 + try output.appendSlice(allocator, try std.fmt.bufPrint(&buf, "<div class=\"scroll\" data-scroll-id=\"{d}-{d}\" data-scroll-x=\"{d}\" data-scroll-y=\"{d}\" style=\"left:{d}ch;top:{d}em;width:{d}ch;height:{d}em;{s}\">", .{ id, child.focus.version, info.offset_x, info.offset_y, r.x, r.y, r.size.width, r.size.height, overflow }));│ │619 try renderPanel(allocator, output, child.focus, info.content); │ │620 try output.appendSlice(allocator, "</div>"); │ │621 } │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯