I’ve wired up the CompletionData no problem, inserting etc into the Avalon Edit control.
The challenge is the searching algorithm.
In the example below, I want new-obj to “match” *New-Object**** in the list and not do a partial find on ***New-DataObject*.
Is there a flag I can set? Or do I need to override the search and implement my own?
Thank you
Doug
Unfortunately this behavior is currently not customizable. It’s hard-coded in the private method
CompletionList.GetMatchQuality.That said, I cannot reproduce your problem. The AvalonEdit matching logic doesn’t work like your screenshot seems to suggest.
AvalonEdit supports 8 types of matches (with the higher ones having priority over the others):
“new-obj” is a type 5 match for “New-Object”, and no match at all for “New-DataObject”.
The completion window is displayed suspiciously far to the right of the word start. I think only “obj” is in your completion segment. You’ll have to check your code that finds the word start and sets
CompletionWindow.StartOffset, I suspect it is considering the dash to be a word border.