╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ─╮ │src/ui.zig│ ╰──────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────╮ │2164 std.fmt.allocPrint(aa, "http://localhost:{d}{s}", .{ port, path }) catch return│ │2165 else │ │2166 path; │ │2167 + self.url = text; │ │2168 │ │2169 var grid = try Grid.init(allocator, .{ .width = width, .height = 1 }); │ │2170 errdefer grid.deinit(); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────╮ │2175 grid.cells.items[try grid.cells.at(.{ 0, i })].rune = ch;│ │2176 i += 1; │ │2177 } │ │2178 + self.url_width = i; │ │2179 self.grid = grid; │ │2180 } │ │2181 │ ╰───────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │2182 pub fn input(self: *Footer, allocator: std.mem.Allocator, key: Key, root_focus: *Focus) !void { │ │2176 - _ = self; │ │2183 _ = allocator; │ │2178 - _ = key; │ │2179 - _ = root_focus; │ │2184 + switch (key) { │ │2185 + .mouse => |mouse| { │ │2186 + if (mouse.ctrl or !inp.leftClickOn(root_focus, self.getFocus().id, mouse)) return; │ │2187 + const rect = (root_focus.children.get(self.getFocus().id) orelse return).rect; │ │2188 + if (mouse.x < rect.x + self.url_width) self.session.host_request = .{ .show_url = self.url };│ │2189 + }, │ │2190 + else => {}, │ │2191 + } │ │2192 } │ │2193 │ │2194 pub fn clearGrid(self: *Footer) void { │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──────────╮ │src/ui/CloneUrl.zig│ ╰───────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │126 .arrow_left => if (self.selected > 0) self.selected - 1 else return, │ │127 .arrow_right => if (self.selected + 1 < self.protocol_count) self.selected + 1 else return, │ │128 .enter => { │ │129 - if (self.session.is_terminal) self.session.host_request = .{ .clone_url = self.protocols[self.selected].url };│ │129 + if (self.session.is_terminal) self.session.host_request = .{ .show_url = self.protocols[self.selected].url }; │ │130 return; │ │131 }, │ │132 .mouse => |mouse| blk: { │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │133 for (0..self.protocol_count) |i| { │ │134 if (inp.leftClickOn(root_focus, self.protocolLabel(i).getFocus().id, mouse)) break :blk i; │ │135 } │ │136 - if (inp.leftClickOn(root_focus, self.urlInput().getFocus().id, mouse)) { │ │137 - if (self.session.is_terminal) self.session.host_request = .{ .clone_url = self.protocols[self.selected].url }; │ │138 - } │ │136 + if (self.session.is_terminal and !mouse.ctrl and inp.leftClickOn(root_focus, self.urlInput().getFocus().id, mouse))│ │137 + self.session.host_request = .{ .show_url = self.protocols[self.selected].url }; │ │138 return; │ │139 }, │ │140 else => return, │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯