int (int start) { if (myUseOnlyFullLineHighlighters) { return myEnd; } List<RangeMarker> blocks = myDocument.getGuardedBlocks(); int result = myEnd; for (int i = 0; i < blocks.size(); i++) { RangeMarker block = blocks.get(i); int nearestValue = getNearestValueAhead(start, alignOffset(block.getStartOffset()), alignOffset(block.getEndOffset())); result = myReverseIteration ? Math.max(result, nearestValue) : Math.min(result, nearestValue); } return result; }