╭ changed ─────────────╮ │src/ui/Repo/Header.zig│ ╰──────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭───────────────────────────────────────╮ │1 const std = @import("std"); │ │2 const ui = @import("../../ui.zig"); │ │3 +const inp = @import("../input.zig");│ │4 const xit = @import("xit"); │ │5 const xitui = xit.xitui; │ │6 const wgt = xitui.widget; │ ╰───────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────╮ │251 pub fn input(self: *View, allocator: std.mem.Allocator, key: Key, root_focus: *Focus) !void {│ │252 _ = allocator; │ │253 const current_tab = self.currentTabIndex() orelse return; │ │253 - var new_tab = current_tab; │ │254 - switch (key) { │ │255 - .arrow_left => new_tab -|= 1, │ │256 - .arrow_right => if (new_tab + 1 < self.tab_ids.count()) { │ │257 - new_tab += 1; │ │258 - }, │ │259 - else => {}, │ │260 - } │ │261 - if (new_tab != current_tab) { │ │254 + if (inp.moveTab(key, current_tab, self.tab_ids.count())) |new_tab| { │ │255 root_focus.setFocus(self.tab_ids.keys()[new_tab]); │ │256 } │ │257 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────╯