╭ changed ─────────────╮ │src/ui/User/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; │ ╰───────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────╮ │184 pub fn input(self: *View, allocator: std.mem.Allocator, key: Key, root_focus: *Focus) !void {│ │185 _ = allocator; │ │186 const current_tab = self.currentTabIndex() orelse return; │ │186 - var new_tab = current_tab; │ │187 - switch (key) { │ │188 - .arrow_left => new_tab -|= 1, │ │189 - .arrow_right => if (new_tab + 1 < self.tab_ids.count()) { │ │190 - new_tab += 1; │ │191 - }, │ │192 - else => {}, │ │193 - } │ │194 - if (new_tab != current_tab) { │ │187 + if (inp.moveTab(key, current_tab, self.tab_ids.count())) |new_tab| { │ │188 root_focus.setFocus(self.tab_ids.keys()[new_tab]); │ │189 } │ │190 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────╯