╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ Fork.zig ─────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
277 if (stack.getSelected()) |selected| switch (selected.*) { 278 .repo_patch_detail => |*view| if (view.focusFirst(root_focus)) return, 279 .repo_files => |*view| if (view.focusHeader(root_focus)) return, 280 .repo_commits => |*view| if (view.focusHeader(root_focus)) return, 281 .user_notifications => |*view| if (view.focusHeader(root_focus)) return, 282 else => {}, 283 }; 284 next_index = stack_index; 285 }, 286 .stack => try child.input(allocator, key, root_focus), 287 else => {}, 288 }, 289 .none => try child.input(allocator, key, root_focus), 290 } 291 if (next_index != current_index) root_focus.setFocus(self.box.children.keys()[next_index]); 292 } 293 294 pub fn clearGrid(self: *View) void { 295 self.box.clearGrid(); 296 } 297 298 pub fn getGrid(self: View) ?Grid { 299 return self.box.getGrid(); 300 } 301 302 pub fn getFocus(self: *View) *Focus { 303 return self.box.getFocus(); 304 } 305 }; 306