void (RangeMarker marker) { SoftWrapModelImpl model = myEditor.getSoftWrapModel(); InlayModelImpl inlayModel = myEditor.getInlayModel(); int startOffset = marker.getStartOffset(); int endOffset = marker.getEndOffset(); if ((myRangeMarkerStartPosition == null || !myEditor.offsetToVisualPosition(startOffset, true, false).equals(myRangeMarkerStartPosition)) && model.getSoftWrap(startOffset) == null && !inlayModel.hasInlineElementAt(startOffset) || (myRangeMarkerEndPosition == null || !myEditor.offsetToVisualPosition(endOffset, false, true).equals(myRangeMarkerEndPosition)) && model.getSoftWrap(endOffset) == null && !inlayModel.hasInlineElementAt(endOffset)) { myRangeMarkerStartPosition = null; myRangeMarkerEndPosition = null; } }