TextEditor: Avoid repetitive calls

Change-Id: Iae1e32c1c078bbc6605b8baa8d856cd30f84b239
Reviewed-by: David Schulz <david.schulz@digia.com>