protected FieldRange findInIndices(BigInteger start, BigInteger end, BigInteger step) {
		for (BigInteger index = start; continueIndex(index, end); index = index.add(step)) {
			TerminalLayout layout = model.getLayout(index);
			VtLine line = layout.line;
			sb.delete(0, sb.length());
			line.gatherText(sb, 0, line.length());
			caseBuf(sb);
			int s;
			if (index.equals(cur.getIndex())) {
				s = cur.getCol();
			}
			else {
				s = forward ? 0 : line.length() - 1;
			}
			FieldRange found = findInLine(s, index);
			if (found != null) {
				return found;
			}
		}
		return null;
	}
Search within the layouts in the given range of indices, inclusive

@param start the first index
@param end the last index, inclusive
@param step the step (1 or -1)
@return the field range, if found, or null
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/terminal/TerminalFinder.java