def x_modifiable(self):
        """
        The index where chars start to be modifiable. Modifiable chars are
        those input text that can still be edited by users. Any characters
        before a linebreak is not modifiable.
        :rtype: int
        """
        idx = self.chars.rfind('\n')
        return idx + 1 if idx != -1 else 0

        The index where chars start to be modifiable. Modifiable chars are
        those input text that can still be edited by users. Any characters
        before a linebreak is not modifiable.
        :rtype: int
        
system/shstreams.py