Fix double click after double clicking hotspot

Closes #2547, Closes #1259, Closes #2569
This commit is contained in:
dail8859 2016-11-14 11:05:13 -05:00
parent 2007cac5a6
commit 642fdb421a
2 changed files with 4 additions and 9 deletions

View File

@ -383,7 +383,6 @@ private:
// For hotspot
bool _linkTriggered = true;
bool _isHotspotDblClicked = false;
bool _isFolding = false;
//For Dynamic selection highlight

View File

@ -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;
}
@ -932,10 +925,13 @@ BOOL Notepad_plus::notify(SCNotification *notification)
currentWord[lastCharIndex] = '\0';
::ShellExecute(_pPublicInterface->getHSelf(), TEXT("open"), currentWord, NULL, NULL, SW_SHOW);
_isHotspotDblClicked = true;
// Re-set the previous wordChar list
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;