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