+fix: enhancement Shift+Alt+LClick on Hyperlink should not fire HL action

This commit is contained in:
METANEOCORTEX\Kotti 2023-03-15 10:22:53 +01:00
parent 1b92711731
commit dfdd887d8c
2 changed files with 3 additions and 2 deletions

View File

@ -8797,8 +8797,8 @@ static LRESULT _MsgNotifyFromEdit(HWND hwnd, const SCNotification* const scn)
case SCN_INDICATORRELEASE: {
if (SciCall_IndicatorValueAt(INDIC_NP3_HYPERLINK, scn->position) > 0) {
bool const bIsSel = Sci_IsMultiOrRectangleSelection() || !SciCall_IsSelectionEmpty();
if ((_s_indic_click_modifiers & SCMOD_ALT) && !bIsSel)
bool const bIsNoSel = Sci_IsSingleSelection() && SciCall_IsSelectionEmpty();
if ((_s_indic_click_modifiers & SCMOD_ALT) && bIsNoSel)
{
if (_s_indic_click_modifiers & SCMOD_CTRL) {
HandleHotSpotURLClicked(scn->position, OPEN_NEW_NOTEPAD3);

View File

@ -759,6 +759,7 @@ DeclareSciCallR0(IsSelectionRectangle, SELECTIONISRECTANGLE, bool);
#define Sci_IsThinSelection() (SciCall_GetSelectionMode() == SC_SEL_THIN)
#define Sci_IsStreamSelection() (SciCall_GetSelectionMode() == SC_SEL_STREAM)
#define Sci_IsSingleSelection() (SciCall_GetSelections() == 1)
#define Sci_IsMultiSelection() ((SciCall_GetSelections() > 1) && !SciCall_IsSelectionRectangle())
#define Sci_IsMultiOrRectangleSelection() ((SciCall_GetSelections() > 1) || SciCall_IsSelectionRectangle())