╭ changed ──────────────╮ │src/ui/Repo/Commits.zig│ ╰───────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │750 } │ │751 return; │ │752 } │ │753 - if (key == .arrow_up and self.contentAtTop() and self.header().focusGitRemote(root_focus)) return;│ │753 + if (key == .arrow_up and self.contentAtTop() and self.header().focusCloneUrl(root_focus)) return; │ │754 if (self.diffActive()) { │ │755 try self.diffInput(key, root_focus); │ │756 } else { │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────╮ │944 // only the clone-url row sits directly below the repository header. │ │945 pub fn getSelectedIndex(self: *View) ?usize { │ │946 if (self.headerActive()) return 0; │ │947 - return if (self.header().hasGitRemote() or !self.contentAtTop()) 1 else 0;│ │947 + return if (self.header().hasCloneUrl() or !self.contentAtTop()) 1 else 0; │ │948 } │ │949 │ │950 - pub fn focusGitRemote(self: *View, root_focus: *Focus) bool { │ │951 - return self.header().focusGitRemote(root_focus); │ │950 + pub fn focusCloneUrl(self: *View, root_focus: *Focus) bool { │ │951 + return self.header().focusCloneUrl(root_focus); │ │952 } │ │953 }; │ │954 │ ╰───────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1008 errdefer box.deinit(allocator); │ │1009 │ │1010 if (!session.data.is_local and (session.data.git_http_port != null or session.data.git_ssh_port != null)) { │ │1011 - var git_remote = try ui.GitRemote.View.initClone(allocator, session, identity); │ │1012 - errdefer git_remote.deinit(allocator); │ │1013 - const min_width = git_remote.minWidth(); │ │1014 - box.getFocus().child_id = git_remote.getFocus().id; │ │1015 - try box.children.put(allocator, git_remote.getFocus().id, .{ .widget = .{ .git_remote = git_remote }, .rect = null, .min_size = .{ .width = min_width, .height = 3 } }); │ │1011 + var clone_url = try ui.CopyableText.View.initClone(allocator, session, identity); │ │1012 + errdefer clone_url.deinit(allocator); │ │1013 + const min_width = clone_url.minWidth(); │ │1014 + box.getFocus().child_id = clone_url.getFocus().id; │ │1015 + try box.children.put(allocator, clone_url.getFocus().id, .{ .widget = .{ .copyable_text = clone_url }, .rect = null, .min_size = .{ .width = min_width, .height = 3 } });│ │1016 } │ │1017 │ │1018 var spacer = try ui.Spacer.init(allocator); │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1036 } │ │1037 │ │1038 pub fn input(self: *Header.View, allocator: std.mem.Allocator, key: Key, root_focus: *Focus) !void {│ │1039 - const git_remote = self.gitRemote() orelse return; │ │1040 - try git_remote.input(allocator, key, root_focus); │ │1039 + const clone_url = self.cloneUrl() orelse return; │ │1040 + try clone_url.input(allocator, key, root_focus); │ │1041 } │ │1042 │ │1043 - pub fn focusGitRemote(self: *Header.View, root_focus: *Focus) bool { │ │1044 - const git_remote = self.gitRemote() orelse return false; │ │1045 - root_focus.setFocus(git_remote.getFocus().id); │ │1043 + pub fn focusCloneUrl(self: *Header.View, root_focus: *Focus) bool { │ │1044 + const clone_url = self.cloneUrl() orelse return false; │ │1045 + root_focus.setFocus(clone_url.getFocus().id); │ │1046 return true; │ │1047 } │ │1048 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────╮ │1049 - pub fn hasGitRemote(self: *Header.View) bool { │ │1050 - return self.gitRemote() != null; │ │1049 + pub fn hasCloneUrl(self: *Header.View) bool { │ │1050 + return self.cloneUrl() != null; │ │1051 } │ │1052 │ │1053 - fn gitRemote(self: *Header.View) ?*ui.GitRemote.View { │ │1053 + fn cloneUrl(self: *Header.View) ?*ui.CopyableText.View { │ │1054 for (self.box.children.values()) |*child| switch (child.widget) {│ │1055 - .git_remote => |*git_remote| return git_remote, │ │1055 + .copyable_text => |*copyable_text| return copyable_text, │ │1056 else => {}, │ │1057 }; │ │1058 return null; │ ╰───────────────────────────────────────────────────────────────────────────────────╯