[BUG_FIXED] (Author: Andreas Jonsson) Remove the restriction of URL parsing.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@966 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
0cfae0f4ce
commit
4f8122d2ef
@ -587,7 +587,7 @@ BOOL Notepad_plus::notify(SCNotification *notification)
|
|||||||
|
|
||||||
case SCN_HOTSPOTDOUBLECLICK :
|
case SCN_HOTSPOTDOUBLECLICK :
|
||||||
{
|
{
|
||||||
notifyView->execute(SCI_SETWORDCHARS, 0, (LPARAM)"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-+.:?&@=/%#");
|
notifyView->execute(SCI_SETWORDCHARS, 0, (LPARAM)"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-+.,:?&@=/%#()");
|
||||||
|
|
||||||
int pos = notifyView->execute(SCI_GETCURRENTPOS);
|
int pos = notifyView->execute(SCI_GETCURRENTPOS);
|
||||||
int startPos = static_cast<int>(notifyView->execute(SCI_WORDSTARTPOSITION, pos, false));
|
int startPos = static_cast<int>(notifyView->execute(SCI_WORDSTARTPOSITION, pos, false));
|
||||||
@ -611,6 +611,11 @@ BOOL Notepad_plus::notify(SCNotification *notification)
|
|||||||
|
|
||||||
notifyView->getGenericText(currentWord, MAX_PATH*2, startPos, endPos);
|
notifyView->getGenericText(currentWord, MAX_PATH*2, startPos, endPos);
|
||||||
|
|
||||||
|
// This treatment would fail on some valid URLs where there's actually supposed to be a comma or parenthesis at the end.
|
||||||
|
int lastCharIndex = _tcsnlen(currentWord, MAX_PATH*2) - 1;
|
||||||
|
if(lastCharIndex >= 0 && (currentWord[lastCharIndex] == ',' || currentWord[lastCharIndex] == ')' || currentWord[lastCharIndex] == '('))
|
||||||
|
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;
|
_isHotspotDblClicked = true;
|
||||||
notifyView->execute(SCI_SETCHARSDEFAULT);
|
notifyView->execute(SCI_SETCHARSDEFAULT);
|
||||||
|
Loading…
Reference in New Issue
Block a user