mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-01 12:24:14 +01:00
Single-click to open a URL / link (rather than double-click).
This commit is contained in:
parent
8ea35d4e6d
commit
d501a9ba0e
@ -2106,6 +2106,13 @@ public class JEditTextArea extends JComponent
|
||||
|
||||
private void doSingleClick(MouseEvent evt, int line,
|
||||
int offset, int dot) {
|
||||
// Check for click on urls
|
||||
String clickedURL = checkClickedURL(getLineText(line), offset);
|
||||
if (clickedURL != null) {
|
||||
Base.openURL(clickedURL);
|
||||
return;
|
||||
}
|
||||
|
||||
if ((evt.getModifiers() & InputEvent.SHIFT_MASK) != 0) {
|
||||
rectSelect = (evt.getModifiers() & InputEvent.CTRL_MASK) != 0;
|
||||
select(getMarkPosition(),dot);
|
||||
@ -2122,13 +2129,6 @@ public class JEditTextArea extends JComponent
|
||||
if (getLineLength(line) == 0)
|
||||
return;
|
||||
|
||||
// Check for click on urls
|
||||
String clickedURL = checkClickedURL(getLineText(line), offset);
|
||||
if (clickedURL != null) {
|
||||
Base.openURL(clickedURL);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
int bracket = TextUtilities.findMatchingBracket(document,
|
||||
Math.max(0,dot - 1));
|
||||
|
Loading…
Reference in New Issue
Block a user