Menu

#1679 Don't modify selection from SCN_HOTSPOTRELEASECLICK handler

Documentation
closed-fixed
5
2015-11-23
2015-01-06
No

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."

Related

Bugs: #1781

Discussion

  • Anonymous

    Anonymous - 2015-01-06

    Deleted

     

    Last edit: Anonymous 2015-01-06
  • Neil Hodgson

    Neil Hodgson - 2015-01-09
    • labels: --> scintilla, documentation
    • assigned_to: Neil Hodgson
     
  • Neil Hodgson

    Neil Hodgson - 2015-01-09

    Committed change as [eaecda].

     

    Related

    Commit: [eaecda]

  • Neil Hodgson

    Neil Hodgson - 2015-01-09
    • status: open --> open-fixed
     
  • Neil Hodgson

    Neil Hodgson - 2015-01-19
    • status: open-fixed --> closed-fixed
     
  • Anonymous

    Anonymous - 2015-11-23

    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..

     
  • Anonymous

    Anonymous - 2015-11-23

    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.

     

Log in to post a comment.

MongoDB Logo MongoDB