public bool CompleteWord() { if (SelectionIndex == -1 || completionDataList == null) { return(false); } CompletionData item = completionDataList[SelectionIndex]; if (item == null) { return(false); } item.InsertCompletionText(this); AddWordToHistory(PartialWord, item.CompletionText); OnWordCompleted(new CodeCompletionContextEventArgs(CompletionWidget, CodeCompletionContext, item.CompletionText)); return(true); }
public bool CompleteWord(ref KeyActions ka, Gdk.Key closeChar, char keyChar, Gdk.ModifierType modifier) { if (SelectionIndex == -1 || completionDataList == null) { return(false); } CompletionData item = completionDataList [SelectionIndex]; if (item == null) { return(false); } // first close the completion list, then insert the text. // this is required because that's the logical event chain, otherwise things could be messed up CloseCompletionList(); item.InsertCompletionText(this, ref ka, closeChar, keyChar, modifier); AddWordToHistory(PartialWord, item.CompletionText); OnWordCompleted(new CodeCompletionContextEventArgs(CompletionWidget, CodeCompletionContext, item.CompletionText)); return(true); }