Boolean ICodeEditor.Find(String findText, Boolean matchCase, Boolean searchReverse) { Int32 characterIndex = this.editorView.Caret.Position.CharacterIndex; if (((this.TextView.Selection.Count > 0) && (this.TextView.Selection.ActiveSpan != null)) && (this.TextView.Selection.ActiveSpan.Length > 0)) { if (searchReverse) { characterIndex = this.TextView.Selection.ActiveSpan.End - 1; } else { characterIndex = this.TextView.Selection.ActiveSpan.End; } } this.findLogic.MatchCase = matchCase; this.findLogic.SearchString = findText; this.findLogic.SearchReverse = searchReverse; TextSpan span = this.findLogic.FindNext(characterIndex, false); if (span != null) { ICodeEditor editor = this; editor.ClearSelection(); editor.Select(span.Start, span.Length); editor.EnsureSpanVisible(span.Start, span.Length); editor.CaretPosition = span.End; editor.EnsureCaretVisible(); return(true); } return(false); }