def _find_line_start_index(self, index):
        """
        For the index of a character at a certain line, calculate the index of
        the first character on that line.

        Return (row, index) tuple.
        """
        indexes = self._line_start_indexes

        pos = bisect.bisect_right(indexes, index) - 1
        return pos, indexes[pos]
For the index of a character at a certain line, calculate the index of
        the first character on that line.

        Return (row, index) tuple.