(self, buf, pos, inslen, dellen)
Called when document updated
Called when document updated
Called when document updated
def updated(self, buf, pos, inslen, dellen):
        """Called when document updated"""

        if inslen:
            style = 0
            if 0 < pos <= len(self.styles):
                style = self.styles.getints(pos - 1, pos)[0]
            self.styles.replaceints(pos, pos + dellen, [style] * inslen)
        else:
            self.styles.delete(pos, pos + dellen)

        self.marks.updated(pos, inslen, dellen)
        self.update_screen(pos, inslen, dellen)
def updated ( self , buf , pos , inslen , dellen ) : if inslen : style = 0 if 0 < pos <= len ( self . styles ) : style = self . styles . getints ( pos - 1 , pos ) [ 0 ] self . styles . replaceints ( pos , pos + dellen , [ style ] * inslen ) else : self . styles . delete ( pos , pos + dellen ) self . marks . updated ( pos , inslen , dellen ) self . update_screen ( pos , inslen , dellen )