╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ Undo.zig ─────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
679 const id = rows.getFocus().child_id orelse return true; 680 return rows.children.getIndex(id) == 0 and scroll.y == 0; 681 } 682 683 // moving up from the sub header returns to the page's tabs 684 pub fn atTop(self: *View) bool { 685 return self.headerActive(); 686 } 687 688 // arriving from the page's tabs lands on the sub header, not the content 689 pub fn focusHeader(self: *View, root_focus: *Focus) bool { 690 root_focus.setFocus(self.headerBox().getFocus().id); 691 return true; 692 } 693 pub fn deinit(self: *View, allocator: std.mem.Allocator) void { 694 self.box.deinit(allocator); 695 } 696 pub fn clearGrid(self: *View) void { 697 self.box.clearGrid(); 698 } 699 pub fn getGrid(self: View) ?Grid { 700 return self.box.getGrid(); 701 } 702 pub fn getFocus(self: *View) *Focus { 703 return self.box.getFocus(); 704 } 705 }; 706