Hi Dave,
As I wrote before I'm working on custom autocomplete list for my VB scripts.
So, I use a callback for SCINTILLANOTIFICATION.AUTOCSELECTION. It works fine but one thing: I cannot cancel insertion with editor.autoCCancel() although Scintilla documentation says: "Automatic insertion can be cancelled by sending a SCI_AUTOCCANCEL message before returning from the notification."

I really need this feature because standard behaviour is to insert the string into caret position - this is not correct if a user opens a list after a part of name entered. Of course I can replace incorrect text in the callback but this insertion is already in undo history!



  • Pavel Kulakov

    Pavel Kulakov - 2010-09-24

    Relates to PythonScript.dll

  • Dave Brotherstone

    Ok - this is not really a bug, just an unintended feature :)

    It's down to the fact that Scintilla events are processed asynchronously due to threading issues doing it any other way.

    I'll try to come up with a solution to this - perhaps a separate event registration for the AUTOCSELECTION event to be handled differently (perhaps with some restrictions about what you can do, like the only editor call you can make is editor.autoCCancel()).

    Alternatively, take a look at user lists, which are similar to auto-complete, but don't auto insert (you get an index as to which entry has been chosen).
    Let me know if this works for you.


  • Pavel Kulakov

    Pavel Kulakov - 2010-09-29

    User list has another problem. My autocompletion happens when a user presses one of keys: ENTER, SPACE or '('. In case of user list the key is typed as a character before AUTOCSELECTION event.

    So, I decided to use auto-complete list. It work fine and I can live with that side-effect.


  • Dave Brotherstone

    • status: open --> closed-fixed
    • Group: --> all_versions
  • Dave Brotherstone

    This is now available in v1.0 - you can use editor.callbackSync(...) to add a synchronous callback, where you can call editor.autoCCancel()


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks