void (@NotNull Editor editor, @NotNull RangeHighlighter highlighter, @NotNull Graphics g) { Rectangle clip = g.getClipBounds(); int lineHeight = editor.getLineHeight(); int startLine = clip.y / lineHeight; int endLine = Math.min(((clip.y + clip.height) / lineHeight) + 1, ((EditorImpl)editor).getVisibleLineCount()); if (startLine >= endLine) { return; } // workaround - editor ask us to paint line 4-6, but we should draw line for line 3 (startLine - 1) also, otherwise it will be not rendered int actualStartLine = startLine == 0 ? 0 : startLine - 1; int y = (actualStartLine + 1) * lineHeight; g.setColor(editor.getColorsScheme().getColor(EditorColors.INDENT_GUIDE_COLOR)); for (int visualLine = actualStartLine; visualLine < endLine; visualLine++) { if (gutterContentProvider.isShowSeparatorLine(editor.visualToLogicalPosition(new VisualPosition(visualLine, 0)).line, editor)) { g.drawLine(clip.x, y, clip.x + clip.width, y); } y += lineHeight; } }