╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ─────────────╮ │src/ui/Repo/Issues.zig│ ╰──────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────╮ │579 return self.box.getFocus(); │ │580 } │ │581 │ │584 - // for the parent's "scroll up at the top jumps to the header" check. in the │ │585 - // detail pane that means the description is focused and can't scroll up any │ │586 - // further; up from the tags moves to the description instead. when the list │ │587 - // holds focus, report its selected row directly (window-navigation rows │ │588 - // included). │ │582 + // for the parent's "scroll up at the top jumps to the header" check. when │ │583 + // the list holds focus, report its selected row directly. │ │584 pub fn getSelectedIndex(self: *View) ?usize { │ │585 if (self.detailActive()) { │ │591 - if (self.tagsFocused()) return 1; │ │592 - return if (self.detailScroll().y == 0) 0 else 1; │ │586 + return if (self.detailScroll().y == 0 and self.paneTopFocused()) 0 else 1;│ │587 } │ │588 const lb = self.listBox(); │ │589 const cid = lb.getFocus().child_id orelse return null; │ ╰───────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────╮ │590 return lb.children.getIndex(cid); │ │591 + } │ │592 + │ │593 + // whether the focused element is the detail pane's topmost one, so up has│ │594 + // nowhere further to go within the pane. │ │595 + fn paneTopFocused(self: *View) bool { │ │596 + const tf = self.tagFlow() orelse return true; │ │597 + if (!self.tagsFocused()) return false; │ │598 + const cid = tf.focus.child_id orelse return true; │ │599 + const cur = tf.indexOfFocusId(cid) orelse return true; │ │600 + return tf.rowStep(cur, false) == null; │ │601 } │ │602 }; │ │603 │ ╰───────────────────────────────────────────────────────────────────────────────────╯