Fix cursor flickering after double clicking on URL

Fix #5529
This commit is contained in:
Don HO 2019-04-16 22:11:43 +02:00
parent b2d4430df9
commit 687c6486a3
No known key found for this signature in database
GPG Key ID: 6C429F1D8D84F46E

View File

@ -1012,6 +1012,11 @@ BOOL Notepad_plus::notify(SCNotification *notification)
notifyView->execute(SCI_SETCURRENTPOS, endPos);
generic_string url = notifyView->getGenericTextAsString(startPos, endPos);
// remove the flickering: it seems a mouse click is missing after SCN_HOTSPOTDOUBLECLICK
::PostMessage(notifyView->getHSelf(), WM_LBUTTONDOWN, 0, 0);
::PostMessage(notifyView->getHSelf(), WM_LBUTTONUP, 0, 0);
::ShellExecute(_pPublicInterface->getHSelf(), TEXT("open"), url.c_str(), NULL, NULL, SW_SHOW);
break;