╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ Repo.zig ─────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
376 .repo_issues => |*v| v.getSelectedIndex() == 0, 377 .home_settings => |*v| v.getSelectedIndex() == 0, 378 .home_auth => |*v| v.getSelectedIndex() == 0, 379 .quit => |*v| v.getSelectedIndex() == 0, 380 else => false, 381 }; 382 if (at_top) { 383 index = header_index; 384 } else { 385 try child.input(allocator, key, root_focus); 386 } 387 } 388 }, 389 else => {}, 390 } 391 }, 392 .down => { 393 switch (child.*) { 394 .repo_header => { 395 index = stack_index; 396 }, 397 .stack => { 398 try child.input(allocator, key, root_focus); 399 }, 400 else => {}, 401 } 402 }, 403 .none => { 404 try child.input(allocator, key, root_focus); 405 }, 406 } 407 408 if (index != current_index) { 409 root_focus.setFocus(self.box.children.keys()[index]); 410 } 411 } 412 } 413 } 414 415 pub fn clearGrid(self: *View) void { 416 self.box.clearGrid(); 417 } 418 419 pub fn getGrid(self: View) ?Grid { 420 return self.box.getGrid(); 421 } 422 423 pub fn getFocus(self: *View) *Focus { 424 return self.box.getFocus(); 425 } 426 }; 427