╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ Repo.zig ─────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
678 } 679 }, 680 .down => { 681 switch (child.*) { 682 .repo_header => { 683 if (stack.getSelected()) |selected_widget| switch (selected_widget.*) { 684 .repo_files => |*v| if (v.focusHeader(root_focus)) return, 685 .repo_commits => |*v| if (v.focusHeader(root_focus)) return, 686 .repo_refs => |*v| if (v.focusHeader(root_focus)) return, 687 .repo_events => |*v| if (v.focusHeader(root_focus)) return, 688 .repo_undo => |*v| if (v.focusHeader(root_focus)) return, 689 .repo_settings => |*v| if (v.focusHeader(root_focus)) return, 690 .user_notifications => |*v| if (v.focusHeader(root_focus)) return, 691 else => {}, 692 }; 693 index = stack_index; 694 }, 695 .stack => { 696 try child.input(allocator, key, root_focus); 697 }, 698 else => {}, 699 } 700 }, 701 .none => { 702 try child.input(allocator, key, root_focus); 703 }, 704 } 705 706 if (index != current_index) { 707 root_focus.setFocus(self.box.children.keys()[index]); 708 } 709 } 710 } 711 } 712 713 pub fn clearGrid(self: *View) void { 714 self.box.clearGrid(); 715 } 716 717 pub fn getGrid(self: View) ?Grid { 718 return self.box.getGrid(); 719 } 720 721 pub fn getFocus(self: *View) *Focus { 722 return self.box.getFocus(); 723 } 724 }; 725