╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ Diff.zig ─────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
294 _ = allocator; 295 const sc = &self.scroll; 296 const box = self.inner(); 297 if (inp.rowDelta(key, @intCast(box.children.count()))) |delta| return ui.widget.moveRowFocus(box, sc, root_focus, delta); 298 switch (key) { 299 // scroll horizontally within the diff 300 .arrow_left => if (!ui.widget.moveInSelectedRow(box, root_focus, false) and sc.x > 0) { 301 sc.x -= 1; 302 sc.clampToContent(); 303 }, 304 .arrow_right => if (!ui.widget.moveInSelectedRow(box, root_focus, true)) { 305 sc.x += 1; 306 sc.clampToContent(); 307 }, 308 // Enter / a click on a "previous"/"next" row follow its "a:" link in 309 // the host (it reloads the adjacent window), so they don't reach here. 310 else => {}, 311 } 312 } 313 }; 314