Calling SCI_GOTOLINE from a SCN_HOTSPOTRELEASECLICK handler causes a spurious selection to appear. I think it would be best to call this out in the documentation (rather than change the code). I suggest adding the following to the documentation for SCN_HOTSPOTCLICK/SCN_HOTSPOTDOUBLECLICK/SCN_HOTSPOTRELEASECLICK:
"In the notification handler, you should avoid calling any function that modifies the current selection or caret position."
Deleted
Last edit: Anonymous 2015-01-06
Committed change as [eaecda].
Related
Commit: [eaecda]
How should one handle such cases? If not in the event handler? Is this documented somewhere? Currently I am able to workaround this by adding some time delay.. But I don't like this hack.. Please point me to the right direction..
Call PostMessage() with a user-defined message number to get yourself out of Scintilla event handler jail. Then handle the message you just posted in your application's message loop.