//Autocomplete trigger private void editor_CharAdded(object sender, CharAddedEventArgs e) { if (e.Char == '(') { if (!editor.AutoCActive) { editor.AutoCShow(0, ShiroLexer.GetAutoCompleteItems()); } } }
private void showAutocompleteMenu_Click(object sender, EventArgs e) { if (editor.AutoCActive) { return; } var currentPos = editor.CurrentPosition; var wordStartPos = editor.WordStartPosition(currentPos, true); var lenEntered = currentPos - wordStartPos; if (lenEntered > 0) { if (!editor.AutoCActive) { editor.AutoCShow(lenEntered, ShiroLexer.GetAutoCompleteItems()); } } }