╭ changed ───────────────╮ │src/ui/widget/thread.zig│ ╰────────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────╮ │← previous│ ╰──────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────╮ │2474 else => {}, │ │2475 } │ │2476 } │ │2426 - │ │2427 - // the tool row's first child after the spacer that pushes it right │ │2428 - const first_in_row_index: usize = 1; │ │2477 │ │2478 fn toolRowFocused(self: *This, index: usize, root_focus: *Focus) bool { │ │2479 return self.focusedDetailChild(index, root_focus) == tool_row_index;│ ╰──────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────╮ │2510 │ │2511 // return to the list. │ │2512 fn focusList(self: *This, index: usize, root_focus: *Focus) void {│ │2513 + if (self.detail_only) return; │ │2514 root_focus.setFocus(self.listScroll(index).getFocus().id); │ │2515 } │ │2516 │ ╰────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────╮ │2517 // cross to the header tabs above the stack. │ │2518 fn focusHeader(self: *This, root_focus: *Focus) void { │ │2519 + if (self.detail_only) return; │ │2520 root_focus.setFocus(self.box.children.keys()[header_index]);│ │2521 } │ │2522 │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────╮ │2530 │ │2531 pub fn getFocus(self: *This) *Focus { │ │2532 return self.box.getFocus(); │ │2533 + } │ │2534 + │ │2535 + pub fn atTop(self: *This, root_focus: *Focus) bool { │ │2536 + if (!self.detail_only) return self.getSelectedIndex() == 0; │ │2537 + const index = self.selectedSplitIndex() orelse return false; │ │2538 + const focused = self.focusedDetailChild(index, root_focus) orelse return false;│ │2539 + for (0..self.detailInner(index).children.count()) |child_index| { │ │2540 + if (!self.detailChildFocusable(index, child_index)) continue; │ │2541 + return focused == child_index; │ │2542 + } │ │2543 + return false; │ │2544 } │ │2545 │ │2546 // for the parent's "scroll up at the top jumps to the header" check: at the │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯