parameters: (self, end)
docstring: 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
docstring_summary: 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
docstring_tokens: 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
function: 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)
  
          self.sidebar_text.config(state=tk.NORMAL)
          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.sidebar_text.config(state=tk.DISABLED)
  
          self.prev_end = end
function_tokens: 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 ) self . sidebar_text . config ( state = tk . NORMAL ) 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 . sidebar_text . config ( state = tk . DISABLED ) self . prev_end = end