def _rel_cursor_pos_to_abs_pos(self, value, lines=None):
        """
        Convert a cursor position relative to the start (int) to a tuple of (row, column).
        'lines' are optional and specify a list of lines on which these calculations should be made.
        :param value: value to convert
        :type value: int
        :param lines: alternative lines to calculate position from (default: current lines)
        :type lines: list of str
        """
        if lines is None:
            # get lines
            lines = self.text.split("\n")
        n = value
        row = 0
        while True:
            if row >= len(lines):
                # for some reason, we are at the end of the text. this is probably a bug, but lets return an approximate value to the end
                return (len(lines) - 1, len(lines[len(lines) - 1]) - 1 )
            ll = len(lines[row])
            if n <= ll:
                # n fits in line
                return row, n
            else:
                # n must be in next line
                n -= (ll + 1)  # 1 for newline
                row += 1

        Convert a cursor position relative to the start (int) to a tuple of (row, column).
        'lines' are optional and specify a list of lines on which these calculations should be made.
        :param value: value to convert
        :type value: int
        :param lines: alternative lines to calculate position from (default: current lines)
        :type lines: list of str
        
system/shui/tkui.py