def find_by_class_fallback(self, view, point, forward, classes, seperators):
      if forward:
        delta = 1
        end_position = self.view.size()
        if point > end_position:
          point = end_position
      else:
        delta = -1
        end_position = 0
        if point < end_position:
          point = end_position

      while point != end_position:
        if view.classify(point) & classes != 0:
          return point
        point += delta

      return point
dataset/ETHPy150Open grundprinzip/sublemacspro/jove.py/SbpMoveWordCommand.find_by_class_fallback/original