[TextEditor] Added bounds check in coordinate translation routines.