Rectangle (@NotNull List<? extends Range> ranges, @NotNull Editor editor, int lineNum) { int yStart = editor.visualLineToY(lineNum); Rectangle clip = new Rectangle(0, yStart, 0, editor.getLineHeight()); List<ChangesBlock<Unit>> blocks = VisibleRangeMerger.merge(editor, ranges, clip); if (blocks.isEmpty()) return null; List<ChangedLines<Unit>> changes = blocks.get(0).changes; int y = changes.get(0).y1; int endY = changes.get(changes.size() - 1).y2; if (y == endY) { endY += editor.getLineHeight(); } IntPair area = getGutterArea(editor); return new Rectangle(area.first, y, area.second - area.first, endY - y); }