AutoComplete doens't show 1 entry

Topics: Developer Forum, Project Management Forum, User Forum
Sep 26, 2013 at 2:09 PM
Hello guys.
I'm trying to do an AutoComplete. It works quite well but if there's only 1 entry in the List "possiblewords" it dont even show the box and automatically paste the word twice by pressing the first letter.
Why?
// Auto Complete
            if (Char.IsLetter(e.Ch))
            {
                string word = editor.GetWordFromPosition(editor.NativeInterface.GetCurrentPos());

                if (String.IsNullOrEmpty(word)) return;
                List<string> possibleWords = null;

                possibleWords = new List<string>();

                foreach (string s in (acWords.FindAll(item => item.StartsWith(word, StringComparison.OrdinalIgnoreCase))))
                    possibleWords.Add(s);

                if (possibleWords.Count > 0)
                {
                    possibleWords.Sort();
                    editor.AutoComplete.List.Clear();
                    editor.AutoComplete.List = possibleWords;
                    editor.AutoComplete.Show();
                } 
                
            }
acWords is a public list with all of my words.
Please help
Coordinator
Sep 27, 2013 at 12:19 AM
I believe the issue you're having is the same one identified by WI #26753:
https://scintillanet.codeplex.com/workitem/26753

The fix for this exists in Trunk, but hasn't made it into an official release yet. Try getting the changes from Trunk and doing your own build in the meantime.


Jacob