[plugin dev question] Blocking the default Npp auto-completion programmatically
-
Hello community,
I’m currently writing a plugin that implements its own auto-completion mechanic and window.
I would like to not prevent the default Npp auto-completion window from being displayed. Obviously, i can’t ask my user to deactivate the auto-completion via the options because i want him to be able to use the default autocomp for others files.
I could call
SCI_AUTOCCANCEL
After each char input but that’s suboptimal… and the window is briefly displayed anyway…At the moment i got 2 (ugly) solutions :
-
Call
SCI_AUTOCSTOPSwith"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_
-> this is effective, but for some reasons, it makes Npp slow down when editing a big file (> 40k lines) -
Start recording a macro programmatically, this effectively blocks the default autocomp. But for obvious reasons, this is not a good solution…
Can you think of anything else?
Otherwise, i will create an issue to ask for a new Notepad++ message that allows the deactivation of the auto-completion.
-
-
There are user lists but I have no idea if that would be sufficient for what you need or it might interfere with the default auto-complete.
My other suggestion would be to try to find some other plugins that show their own auto-complete list and figure out how they do it. I can’t remember any off the top of my head but I know there are a few around that do it.
-
I don’t see how the user lists can help me :)
I already searched for plugin that implement their own auto-completion, but unfortunatlely, none of them prevent the default autocomp from being displayed :
http://csscriptnpp.codeplex.com/ is the closest to what i’m developing, but you manually have to deactivate the default auto-completion.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login