╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ────────────╮ │src/ui/Repo/Roles.zig│ ╰─────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │259 .arrow_left, .arrow_right => _ = ui.widget.moveInSelectedRow(rows, root_focus, key == .arrow_right),│ │260 else => { │ │265 - // the previous link, when there is one, sits above the rows │ │266 - const offset: usize = @intFromBool(self.data.start > 0); │ │261 + // the add row and the previous link, when there is one, sit above the rows │ │262 + const offset: usize = add_index + 1 + @intFromBool(self.data.start > 0); │ │263 if (current < offset or current - offset >= self.data.rows.len) return; │ │264 const row = self.data.rows[current - offset]; │ │265 const row_box = &rows.children.values()[current].widget.box; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │266 const button_id = row_box.getFocus().child_id orelse return; │ │271 - const pressed = switch (key) { │ │272 - .enter => root_focus.grandchild_id == button_id, │ │273 - .mouse => |mouse| inp.leftClickOn(root_focus, button_id, mouse), │ │274 - else => false, │ │275 - }; │ │276 - if (!pressed) return; │ │267 + if (!inp.activated(root_focus, button_id, key)) return; │ │268 const action: Action = switch (row_box.children.getIndex(button_id) orelse return) {│ │269 1 => .revoke, │ │270 2 => if (row.role == .owner) .demote else .promote, │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────╮ │296 } │ │297 │ │298 pub fn clearGrid(self: *View) void {│ │308 - self.box.clearGrid(); │ │299 + self.scroll.clearGrid(); │ │300 } │ │301 │ │302 pub fn getGrid(self: View) ?Grid { │ ╰─────────────────────────────────────────────╯ ╭──────────────────────────────────────────────╮ │312 - return self.box.getGrid(); │ │303 + return self.scroll.getGrid(); │ │304 } │ │305 │ │306 pub fn getFocus(self: *View) *Focus {│ ╰──────────────────────────────────────────────╯ ╭───────────────────────────────────────────────╮ │316 - return self.box.getFocus(); │ │307 + return self.scroll.getFocus(); │ │308 } │ │309 │ │310 // up leaves the view from the add row│ ╰───────────────────────────────────────────────╯