╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ Diff.zig ─────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭ find file ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╮ ╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╮ │ │ │http│ ssh │ │ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╯ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╯
353 const sc = &self.scroll; 354 const box = self.inner(); 355 if (inp.rowDelta(key, @intCast(box.children.count()))) |delta| return ui.widget.moveRowFocus(box, sc, root_focus, delta); 356 switch (key) { 357 // scroll horizontally within the diff 358 .arrow_left => if (!ui.widget.moveInSelectedRow(box, root_focus, false) and sc.x > 0) { 359 sc.x -= 1; 360 sc.clampToContent(); 361 }, 362 .arrow_right => if (!ui.widget.moveInSelectedRow(box, root_focus, true)) { 363 sc.x += 1; 364 sc.clampToContent(); 365 }, 366 // Enter / a click on a "previous"/"next" row follow its "a:" link in 367 // the host (it reloads the adjacent window), so they don't reach here. 368 else => {}, 369 } 370 } 371 }; 372