'Return text line at line number *line_nb*'

def get_text_line(self, line_nb):

    try:
        return to_text_string(self.toPlainText()).splitlines()[line_nb]
    except IndexError:
        return self.get_line_separator()
