╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ Repo.zig ─────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
658 }, 659 else => {}, 660 } 661 }, 662 .down => { 663 switch (child.*) { 664 .repo_header => { 665 if (stack.getSelected()) |selected_widget| switch (selected_widget.*) { 666 .repo_files => |*v| if (v.focusHeader(root_focus)) return, 667 .repo_commits => |*v| if (v.focusHeader(root_focus)) return, 668 .repo_refs => |*v| if (v.focusHeader(root_focus)) return, 669 .repo_events => |*v| if (v.focusHeader(root_focus)) return, 670 .repo_undo => |*v| if (v.focusHeader(root_focus)) return, 671 .repo_settings => |*v| if (v.focusHeader(root_focus)) return, 672 .user_notifications => |*v| if (v.focusHeader(root_focus)) return, 673 else => {}, 674 }; 675 index = stack_index; 676 }, 677 .stack => { 678 try child.input(allocator, key, root_focus); 679 }, 680 else => {}, 681 } 682 }, 683 .none => { 684 try child.input(allocator, key, root_focus); 685 }, 686 } 687 688 if (index != current_index) { 689 root_focus.setFocus(self.box.children.keys()[index]); 690 } 691 } 692 } 693 } 694 695 pub fn clearGrid(self: *View) void { 696 self.box.clearGrid(); 697 } 698 699 pub fn getGrid(self: View) ?Grid { 700 return self.box.getGrid(); 701 } 702 703 pub fn getFocus(self: *View) *Focus { 704 return self.box.getFocus(); 705 } 706 }; 707