void (RangeHighlighter marker, Rectangle clip, Graphics g) { if (!marker.isValid()) { return; } Color separatorColor = marker.getLineSeparatorColor(); if (separatorColor != null) { int lineNumber = marker.getLineSeparatorPlacement() == SeparatorPlacement.TOP ? marker.getDocument() .getLineNumber(marker.getStartOffset()) : marker.getDocument().getLineNumber(marker.getEndOffset()); if (lineNumber < 0 || lineNumber >= myDocument.getLineCount()) { return; } int endShift = clip.x + clip.width; g.setColor(separatorColor); if (mySettings.isRightMarginShown() && myScheme.getColor(EditorColors.RIGHT_MARGIN_COLOR) != null) { endShift = Math.min(endShift, mySettings.getRightMargin(myProject) * getSpaceWidth(Font.PLAIN)); } int y = visibleLineNumberToYPosition(logicalToVisualPosition(new LogicalPosition(lineNumber, 0)).line); if (marker.getLineSeparatorPlacement() != SeparatorPlacement.TOP) { y += getLineHeight(); } g.drawLine(0, y - 1, endShift, y - 1); } }