def _find_line_start_index(self, index):
        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
dataset/ETHPy150Open jonathanslenders/python-prompt-toolkit/prompt_toolkit/document.py/Document._find_line_start_index