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