╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ Repo.zig ─────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
582 try child.input(allocator, key, root_focus); 583 } 584 } 585 }, 586 else => {}, 587 } 588 }, 589 .down => { 590 switch (child.*) { 591 .repo_header => { 592 if (stack.getSelected()) |selected_widget| switch (selected_widget.*) { 593 .repo_files => |*v| if (v.focusHeader(root_focus)) return, 594 .repo_commits => |*v| if (v.focusHeader(root_focus)) return, 595 .repo_refs => |*v| if (v.focusHeader(root_focus)) return, 596 .repo_events => |*v| if (v.focusHeader(root_focus)) return, 597 .repo_undo => |*v| if (v.focusHeader(root_focus)) return, 598 .repo_settings => |*v| if (v.focusHeader(root_focus)) return, 599 else => {}, 600 }; 601 index = stack_index; 602 }, 603 .stack => { 604 try child.input(allocator, key, root_focus); 605 }, 606 else => {}, 607 } 608 }, 609 .none => { 610 try child.input(allocator, key, root_focus); 611 }, 612 } 613 614 if (index != current_index) { 615 root_focus.setFocus(self.box.children.keys()[index]); 616 } 617 } 618 } 619 } 620 621 pub fn clearGrid(self: *View) void { 622 self.box.clearGrid(); 623 } 624 625 pub fn getGrid(self: View) ?Grid { 626 return self.box.getGrid(); 627 } 628 629 pub fn getFocus(self: *View) *Focus { 630 return self.box.getFocus(); 631 } 632 }; 633