(self, end)
Perform the following action:
        Each line sidebar_text contains the linenumber for that line
        Synchronize with editwin.text so that both sidebar_text and
        editwin.text contain the same number of lines
Perform the following action:
        Each line sidebar_text contains the linenumber for that line
        Synchronize with editwin.text so that both sidebar_text and
        editwin.text contain the same number of lines
Perform the following action : Each line sidebar_text contains the linenumber for that line Synchronize with editwin . text so that both sidebar_text and editwin . text contain the same number of lines
def update_sidebar_text(self, end):
        """
        Perform the following action:
        Each line sidebar_text contains the linenumber for that line
        Synchronize with editwin.text so that both sidebar_text and
        editwin.text contain the same number of lines"""
        if end == self.prev_end:
            return

        width_difference = len(str(end)) - len(str(self.prev_end))
        if width_difference:
            cur_width = int(float(self.sidebar_text['width']))
            new_width = cur_width + width_difference
            self.sidebar_text['width'] = self._sidebar_width_type(new_width)

        with temp_enable_text_widget(self.sidebar_text):
            if end > self.prev_end:
                new_text = '\n'.join(itertools.chain(
                    [''],
                    map(str, range(self.prev_end + 1, end + 1)),
                ))
                self.sidebar_text.insert(f'end -1c', new_text, 'linenumber')
            else:
                self.sidebar_text.delete(f'{end+1}.0 -1c', 'end -1c')

        self.prev_end = end
def update_sidebar_text ( self , end ) : if end == self . prev_end : return width_difference = len ( str ( end ) ) - len ( str ( self . prev_end ) ) if width_difference : cur_width = int ( float ( self . sidebar_text [ 'width' ] ) ) new_width = cur_width + width_difference self . sidebar_text [ 'width' ] = self . _sidebar_width_type ( new_width ) with temp_enable_text_widget ( self . sidebar_text ) : if end > self . prev_end : new_text = '\n' . join ( itertools . chain ( [ '' ] , map ( str , range ( self . prev_end + 1 , end + 1 ) ) , ) ) self . sidebar_text . insert ( f'end -1c' , new_text , 'linenumber' ) else : self . sidebar_text . delete ( f'{end+1}.0 -1c' , 'end -1c' ) self . prev_end = end