╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ Repo.zig ─────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
425 else => false, 426 }; 427 if (at_top) { 428 index = header_index; 429 } else { 430 try child.input(allocator, key, root_focus); 431 } 432 } 433 }, 434 else => {}, 435 } 436 }, 437 .down => { 438 switch (child.*) { 439 .repo_header => { 440 if (stack.getSelected()) |selected_widget| switch (selected_widget.*) { 441 .repo_files => |*v| if (v.focusCloneUrl(root_focus)) return, 442 .repo_commits => |*v| if (v.focusCloneUrl(root_focus)) return, 443 else => {}, 444 }; 445 index = stack_index; 446 }, 447 .stack => { 448 try child.input(allocator, key, root_focus); 449 }, 450 else => {}, 451 } 452 }, 453 .none => { 454 try child.input(allocator, key, root_focus); 455 }, 456 } 457 458 if (index != current_index) { 459 root_focus.setFocus(self.box.children.keys()[index]); 460 } 461 } 462 } 463 } 464 465 pub fn clearGrid(self: *View) void { 466 self.box.clearGrid(); 467 } 468 469 pub fn getGrid(self: View) ?Grid { 470 return self.box.getGrid(); 471 } 472 473 pub fn getFocus(self: *View) *Focus { 474 return self.box.getFocus(); 475 } 476 }; 477