╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ Commits.zig ──────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
1065 pub fn focusCloneUrl(self: *Header.View, root_focus: *Focus) bool { 1066 const clone_url = self.cloneUrl() orelse return false; 1067 root_focus.setFocus(clone_url.getFocus().id); 1068 return true; 1069 } 1070 1071 pub fn hasCloneUrl(self: *Header.View) bool { 1072 return self.cloneUrl() != null; 1073 } 1074 1075 fn cloneUrl(self: *Header.View) ?*ui.widget.CopyableText { 1076 for (self.box.children.values()) |*child| switch (child.widget) { 1077 .copyable_text => |*copyable_text| return copyable_text, 1078 else => {}, 1079 }; 1080 return null; 1081 } 1082 1083 pub fn clearGrid(self: *Header.View) void { 1084 self.box.clearGrid(); 1085 } 1086 1087 pub fn getGrid(self: Header.View) ?Grid { 1088 return self.box.getGrid(); 1089 } 1090 1091 pub fn getFocus(self: *Header.View) *Focus { 1092 return self.box.getFocus(); 1093 } 1094 }; 1095 }; 1096