handleStartEndSequenceForward method

int handleStartEndSequenceForward(
  1. int ixLine,
  2. int ixStop
)

Handles a start stop sequence if the first (or last) line is matching. ixLine is the index of the first line to inspect. step: +1 or -1: signals forward or backward searching. ixStop is the the first "forbidden" index: reaching this index the search stops. Returns the number of lines belonging to the sequence.

Implementation

int handleStartEndSequenceForward(int ixLine, int ixStop) {
  var rc = 1;
  while (ixLine != ixStop &&
      searcherEnd!.next(searcherEnd!.searchEngine.lineByIndex(ixLine),
              searcherEnd!.searchEngine.startColumnByIndex(ixLine)) ==
          null) {
    rc++;
    ixLine++;
  }
  return rc;
}