Пример #1
0
        /// <summary>
        /// 自动完成
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Scintilla_OnCharAdded(object sender, CharAddedEventArgs e)
        {
            var currentPos   = TextEditor.CurrentPosition;
            var wordStartPos = TextEditor.WordStartPosition(currentPos, true);

            // Display the autocompletion list
            var lenEntered = currentPos - wordStartPos;

            if (lenEntered > 0)
            {
                if (!TextEditor.AutoCActive)
                {
                    TextEditor.AutoCShow(lenEntered, regexStr);
                }
            }
        }