╭ changed ────────╮ │src/ui/widget.zig│ ╰─────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │191 // and otherwise shows that edge. │ │192 pub fn scrollToEnteredRow(scroll: *wgt.Scroll(Widget), rect: layout.IRect, down: bool) void { │ │193 const grid = scroll.grid orelse return; │ │194 + // a row wider than the view keeps the horizontal position │ │195 + const target: layout.IRect = if (rect.size.width > grid.size.width - scroll.bar_w) .{ .x = scroll.x, .y = rect.y, .size = .{ .width = 0, .height = rect.size.height } } else rect;│ │196 const h: isize = @intCast(grid.size.height - scroll.bar_h); │ │195 - if (@as(isize, @intCast(rect.size.height)) <= h) return scroll.scrollToRect(rect); │ │197 + if (@as(isize, @intCast(rect.size.height)) <= h) return scroll.scrollToRect(target); │ │198 const edge = if (down) rect.y else rectBottom(rect) - 1; │ │199 if (edge >= scroll.y and edge < scroll.y + h) return; │ │200 scroll.y = if (down) rect.y else rectBottom(rect) - h; │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯