AvalonStudio.TextEditor.TextEditor.HandleTextInput C# (CSharp) 메소드

HandleTextInput() 개인적인 메소드

private HandleTextInput ( string input ) : void
input string
리턴 void
        private void HandleTextInput(string input)
        {
            InvalidateSelectedWord();

            if (!string.IsNullOrEmpty(input))
            {
                TextDocument.BeginUpdate();

                DeleteSelection();

                var caretIndex = CaretIndex;

                if (caretIndex >= 0)
                {
                    TextDocument.Insert(caretIndex, input);
                }

                TextDocument.EndUpdate();

                CaretIndex += input.Length;
                SelectionStart = SelectionEnd = CaretIndex;
                TextView.Invalidate();
            }
        }