Skip to content

Commit

Permalink
click-open link still after moving the mouse over the link area (#1039)
Browse files Browse the repository at this point in the history
  • Loading branch information
mintty committed Oct 14, 2020
1 parent dc8f83a commit f56710e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/termmouse.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// termmouse.c (part of mintty)
// Copyright 2008-12 Andy Koppe, 2017 Thomas Wolff
// Copyright 2008-12 Andy Koppe, 2017-20 Thomas Wolff
// Based on code from PuTTY-0.60 by Simon Tatham and team.
// Licensed under the terms of the GNU General Public License v3 or later.

Expand Down Expand Up @@ -689,9 +689,13 @@ term_mouse_move(mod_keys mods, pos p)
win_update(true);
}
else if (term.mouse_state == MS_OPENING) {
// let's not clear link opening state when just moving the mouse (#1039)
// but only after hovering out of the link area (below)
#if link_opening_only_if_unmoved
term.mouse_state = 0;
term.selected = false;
win_update(true);
#endif
}
else if (term.mouse_state > 0) {
if (term.mouse_mode >= MM_BTN_EVENT)
Expand All @@ -716,6 +720,10 @@ term_mouse_move(mod_keys mods, pos p)
term.hovering = false;
win_update(true);
}
//printf("->hovering %d (opening %d)\n", term.hovering, term.mouse_state == MS_OPENING);
// clear link opening state after hovering out of link area
if (!term.hovering && term.mouse_state == MS_OPENING)
term.mouse_state = 0;
}
}

Expand Down
1 change: 1 addition & 0 deletions wiki/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Terminal features
* Support multiple controls in OSC 4, 5, 10..19, 104, 105 (#1038, xterm).

Window handling
* Click-open link still after moving the mouse over the link area (#1039).
* Keep hotkey-started window in taskbar (#1035).
* Override font zooming also with Ctrl, to support FancyZones (#487).

Expand Down

0 comments on commit f56710e

Please sign in to comment.