This functions gets called a lot so it's speed matters a lot.

 Doing a test for every  time for self.text will be a lot time consuming as self.text combines all the lines in self._lines with \n depending on lines_flags.

You could test `if not self.focus and len(self._lines[0]):` should have the same effect but more efficient.