mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-24 22:34:54 +02:00
Fix double click after double clicking hotspot
Closes #2547, Closes #1259, Closes #2569
This commit is contained in:
parent
2007cac5a6
commit
642fdb421a
@ -383,7 +383,6 @@ private:
|
|||||||
|
|
||||||
// For hotspot
|
// For hotspot
|
||||||
bool _linkTriggered = true;
|
bool _linkTriggered = true;
|
||||||
bool _isHotspotDblClicked = false;
|
|
||||||
bool _isFolding = false;
|
bool _isFolding = false;
|
||||||
|
|
||||||
//For Dynamic selection highlight
|
//For Dynamic selection highlight
|
||||||
|
@ -691,13 +691,6 @@ BOOL Notepad_plus::notify(SCNotification *notification)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (_isHotspotDblClicked)
|
|
||||||
{
|
|
||||||
auto pos = notifyView->execute(SCI_GETCURRENTPOS);
|
|
||||||
notifyView->execute(SCI_SETCURRENTPOS, pos);
|
|
||||||
notifyView->execute(SCI_SETANCHOR, pos);
|
|
||||||
_isHotspotDblClicked = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -932,10 +925,13 @@ BOOL Notepad_plus::notify(SCNotification *notification)
|
|||||||
currentWord[lastCharIndex] = '\0';
|
currentWord[lastCharIndex] = '\0';
|
||||||
|
|
||||||
::ShellExecute(_pPublicInterface->getHSelf(), TEXT("open"), currentWord, NULL, NULL, SW_SHOW);
|
::ShellExecute(_pPublicInterface->getHSelf(), TEXT("open"), currentWord, NULL, NULL, SW_SHOW);
|
||||||
_isHotspotDblClicked = true;
|
|
||||||
|
|
||||||
// Re-set the previous wordChar list
|
// Re-set the previous wordChar list
|
||||||
notifyView->execute(SCI_SETWORDCHARS, 0, reinterpret_cast<LPARAM>(wordChars));
|
notifyView->execute(SCI_SETWORDCHARS, 0, reinterpret_cast<LPARAM>(wordChars));
|
||||||
|
|
||||||
|
// Select the entire link
|
||||||
|
notifyView->execute(SCI_SETANCHOR, startPos);
|
||||||
|
notifyView->execute(SCI_SETCURRENTPOS, endPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
delete[] wordChars;
|
delete[] wordChars;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user