Open links with Super+click

A few people, including myself, many times accidentally click links by
either clicking around aimlessly or getting focus back to Ghostty that
happens to be hovering over a link.

In iTerm2, if you want links enabled, it's always Cmd+Click.
This commit is contained in:
Matt Robenolt
2024-01-26 20:23:40 -08:00
parent 894554f1a0
commit 6c6b42d40c

View File

@ -2008,7 +2008,7 @@ pub fn mouseButtonCallback(
// Handle link clicking. We want to do this before we do mouse
// reporting or any other mouse handling because a successfully
// clicked link will swallow the event.
if (button == .left and action == .release and self.mouse.over_link) {
if (button == .left and action == .release and mods.super and self.mouse.over_link) {
const pos = try self.rt_surface.getCursorPos();
if (self.processLinks(pos)) |processed| {
if (processed) return;