[TextEditor] Fixed bug in search & replace.