╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ Repo.zig ─────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
552 switch (child.*) { 553 .repo_header => { 554 if (stack.getSelected()) |selected_widget| switch (selected_widget.*) { 555 .repo_files => |*v| if (v.focusHeader(root_focus)) return, 556 .repo_commits => |*v| if (v.focusHeader(root_focus)) return, 557 .repo_refs => |*v| if (v.focusHeader(root_focus)) return, 558 .repo_events => |*v| if (v.focusHeader(root_focus)) return, 559 .repo_undo => |*v| if (v.focusHeader(root_focus)) return, 560 else => {}, 561 }; 562 index = stack_index; 563 }, 564 .stack => { 565 try child.input(allocator, key, root_focus); 566 }, 567 else => {}, 568 } 569 }, 570 .none => { 571 try child.input(allocator, key, root_focus); 572 }, 573 } 574 575 if (index != current_index) { 576 root_focus.setFocus(self.box.children.keys()[index]); 577 } 578 } 579 } 580 } 581 582 pub fn clearGrid(self: *View) void { 583 self.box.clearGrid(); 584 } 585 586 pub fn getGrid(self: View) ?Grid { 587 return self.box.getGrid(); 588 } 589 590 pub fn getFocus(self: *View) *Focus { 591 return self.box.getFocus(); 592 } 593 }; 594