I'm trying to implement an autocomplete system for my code editor using ScintillaNet. Everything seems to works fine, but I realized that if the populated list contains strings with characters '_' i.e, the format X_XYZ, the focus is loosed and no string is selected (works for X, X_ and X_X but looses the focus for the following letters).
What I'm trying to do is to show the list after the text "this.".
Strings with this issue are for example:
p_M_Restart -> OK
p_MDWTest -> Fails at D and following letters
My code in the CharAdded event looks like this:
if (editor.GetWordFromPosition(editor.CurrentPos - 1) == TXT_THIS
&& e.Ch == '.')
{
editor.AutoComplete.List = Parameters.ToList();
editor.AutoComplete.SingleLineAccept = false;
editor.AutoComplete.FillUpCharacters = "([";
editor.AutoComplete.Show();
}
Is '_' a spcecial case? or is any consideration needed with this character?
Thanks,
Solved following the ScintillaNet issue:
https://scintillanet.codeplex.com/workitem/34165
Hope this will help other people.