[TextEditor] Fixed bug in replace all.