╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ thread.zig ───────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
2963 const id_hex = std.fmt.bytesToHex(id, .lower); 2964 const route = ui.RoutablePage.repoEventsRoute(self.data.identity, .removed, event_kind, &id_hex, null) orelse return; 2965 try self.session.navigate(route); 2966 } 2967 2968 // return to the list. 2969 fn focusList(self: *This, index: usize, root_focus: *Focus) void { 2970 root_focus.setFocus(self.listScroll(index).getFocus().id); 2971 } 2972 2973 // cross to the header tabs above the stack. 2974 fn focusHeader(self: *This, root_focus: *Focus) void { 2975 root_focus.setFocus(self.box.children.keys()[header_index]); 2976 } 2977 2978 pub fn clearGrid(self: *This) void { 2979 self.box.clearGrid(); 2980 } 2981 2982 pub fn getGrid(self: This) ?Grid { 2983 return self.box.getGrid(); 2984 } 2985 2986 pub fn getFocus(self: *This) *Focus { 2987 return self.box.getFocus(); 2988 } 2989 2990 // for the parent's "scroll up at the top jumps to the header" check: at the 2991 // top only while the header tabs hold focus, so up from the split 2992 // crosses into the tabs first. 2993 pub fn atTop(self: *This) bool { 2994 return self.headerActive(); 2995 } 2996 }; 2997 } 2998