╭ changed ─────────────╮ │src/ui/Repo/Issues.zig│ ╰──────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────╮ │← previous│ ╰──────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │550 switch (key) { │ │551 .arrow_left => if (cur > 0) self.focusTag(tf, root_focus, cur - 1) else try self.focusList(root_focus), │ │552 .arrow_right => if (cur + 1 < count) self.focusTag(tf, root_focus, cur + 1), │ │488 - .arrow_up => if (tf.rowStep(cur, false)) |i| self.focusTag(tf, root_focus, i), │ │553 + .arrow_up => if (tf.rowStep(cur, false)) |i| self.focusTag(tf, root_focus, i) else self.focusSubHeader(root_focus), │ │554 .arrow_down => if (tf.rowStep(cur, true)) |i| self.focusTag(tf, root_focus, i) else try self.focusDescription(root_focus),│ │555 .home => self.focusTag(tf, root_focus, 0), │ │556 .end => self.focusTag(tf, root_focus, count - 1), │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────╮ │620 // return to the list. │ │621 fn focusList(self: *View, root_focus: *Focus) !void { │ │622 root_focus.setFocus(self.listScroll().getFocus().id); │ │623 + } │ │624 + │ │625 + // cross to the sub header tabs above the split. │ │626 + fn focusSubHeader(self: *View, root_focus: *Focus) void { │ │627 + root_focus.setFocus(self.box.children.keys()[sub_header_index]);│ │628 } │ │629 │ │630 pub fn clearGrid(self: *View) void { │ ╰─────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────╮ │639 return self.box.getFocus(); │ │640 } │ │641 │ │572 - // for the parent's "scroll up at the top jumps to the header" check. when │ │573 - // the list holds focus, report its selected row directly. │ │642 + // for the parent's "scroll up at the top jumps to the header" check: at the │ │643 + // top only while the sub header tabs hold focus, so up from the split │ │644 + // crosses into the tabs first. │ │645 pub fn getSelectedIndex(self: *View) ?usize { │ │575 - if (self.detailActive()) { │ │576 - return if (self.detailScroll().y == 0 and self.paneTopFocused()) 0 else 1;│ │577 - } │ │578 - const lb = self.listBox(); │ │579 - const cid = lb.getFocus().child_id orelse return null; │ │580 - return lb.children.getIndex(cid); │ │581 - } │ │582 - │ │583 - // whether the focused element is the detail pane's topmost one, so up has │ │584 - // nowhere further to go within the pane. │ │585 - fn paneTopFocused(self: *View) bool { │ │586 - const tf = self.tagFlow() orelse return true; │ │587 - if (!self.tagsFocused()) return false; │ │588 - const cid = tf.focus.child_id orelse return true; │ │589 - const cur = tf.indexOfFocusId(cid) orelse return true; │ │590 - return tf.rowStep(cur, false) == null; │ │646 + return if (self.subHeaderActive()) 0 else 1; │ │647 } │ │648 }; │ │649 │ ╰───────────────────────────────────────────────────────────────────────────────────────────╯