╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ thread.zig ───────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
2468 root_focus.setFocus(self.box.children.keys()[header_index]); 2469 } 2470 2471 pub fn clearGrid(self: *This) void { 2472 self.box.clearGrid(); 2473 } 2474 2475 pub fn getGrid(self: This) ?Grid { 2476 return self.box.getGrid(); 2477 } 2478 2479 pub fn getFocus(self: *This) *Focus { 2480 return self.box.getFocus(); 2481 } 2482 2483 // for the parent's "scroll up at the top jumps to the header" check: at the 2484 // top only while the header tabs hold focus, so up from the split 2485 // crosses into the tabs first. 2486 pub fn getSelectedIndex(self: *This) ?usize { 2487 return if (self.headerActive()) 0 else 1; 2488 } 2489 }; 2490 } 2491