╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ Files.zig ────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
913 pub fn focusCloneUrl(self: *Header.View, root_focus: *Focus) bool { 914 const clone_url = self.cloneUrl() orelse return false; 915 root_focus.setFocus(clone_url.getFocus().id); 916 return true; 917 } 918 919 pub fn hasCloneUrl(self: *Header.View) bool { 920 return self.cloneUrl() != null; 921 } 922 923 fn cloneUrl(self: *Header.View) ?*ui.CloneUrl.View { 924 for (self.box.children.values()) |*child| switch (child.widget) { 925 .clone_url => |*clone_url| return clone_url, 926 else => {}, 927 }; 928 return null; 929 } 930 931 pub fn clearGrid(self: *Header.View) void { 932 self.box.clearGrid(); 933 } 934 935 pub fn getGrid(self: Header.View) ?Grid { 936 return self.box.getGrid(); 937 } 938 939 pub fn getFocus(self: *Header.View) *Focus { 940 return self.box.getFocus(); 941 } 942 }; 943 }; 944