docs: def pane_position_check(self):
          """ Update right bar pane position if needed
  
          Checks calculates if the cursor is still visible and updates the pane position if it is close to not be seen.
          In case of an un-docked right-bar this method does nothing.
          :return:
          """
          text_buffer = self.get_buffer()
  
          # not needed if the right side bar is un-docked
          from rafcon.gui.singleton import main_window_controller
  
          if main_window_controller is None or main_window_controller.view is None:
              return
          from rafcon.gui.runtime_config import global_runtime_config
          if global_runtime_config.get_config_value('RIGHT_BAR_WINDOW_UNDOCKED'):
              return
  
          # move the pane left if the cursor is to far right and the pane position is less then 440 from its max position
          button_container_min_width = self.button_container_min_width
          width_of_all = button_container_min_width + self.tab_width
          text_view_width = button_container_min_width - self.line_numbers_width
          min_line_string_length = float(button_container_min_width)/float(self.source_view_character_size)
  
          current_pane_pos = main_window_controller.view['right_h_pane'].get_property('position')
          max_position = main_window_controller.view['right_h_pane'].get_property('max_position')
          pane_rel_pos = main_window_controller.view['right_h_pane'].get_property('max_position') - current_pane_pos
          if pane_rel_pos >= width_of_all + self.line_numbers_width:
              pass
          else:
              cursor_line_offset = text_buffer.get_iter_at_offset(text_buffer.props.cursor_position).get_line_offset()
              needed_rel_pos = text_view_width/min_line_string_length*cursor_line_offset \
                               + self.tab_width + self.line_numbers_width
              needed_rel_pos = min(width_of_all, needed_rel_pos)
              if pane_rel_pos >= needed_rel_pos:
                  pass
              else:
                  main_window_controller.view['right_h_pane'].set_property('position', max_position - needed_rel_pos)
                  spacer_width = int(width_of_all + self.line_numbers_width - needed_rel_pos)
                  self.spacer_frame.set_size_request(width=spacer_width, height=-1)