mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 00:36:07 +03:00
Only detect links when Super is held down
This stops underlining and changing to a pointer unless Cmd or Ctrl is held down already.
This commit is contained in:
@ -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 mods.super and self.mouse.over_link) {
|
||||
if (button == .left and action == .release and mods.ctrlOrSuper() and self.mouse.over_link) {
|
||||
const pos = try self.rt_surface.getCursorPos();
|
||||
if (self.processLinks(pos)) |processed| {
|
||||
if (processed) return;
|
||||
@ -2238,6 +2238,9 @@ fn linkAtPos(
|
||||
// If we have no configured links we can save a lot of work
|
||||
if (self.config.links.len == 0) return null;
|
||||
|
||||
// Require super to be held down, so bail early
|
||||
if (!self.mouse.mods.ctrlOrSuper()) return null;
|
||||
|
||||
// Convert our cursor position to a screen point.
|
||||
const mouse_pt = mouse_pt: {
|
||||
const viewport_point = self.posToViewport(pos.x, pos.y);
|
||||
|
Reference in New Issue
Block a user