Fixed the text editor issue that resulted in the replacing all feature looping forever in some cases (closes #426).