List<DividerSeparator> (@NotNull Editor editor1, @NotNull Editor editor2, @NotNull DividerSeparatorPaintable paintable) { if (editor1.isDisposed() || editor2.isDisposed()) return Collections.emptyList(); final List<DividerSeparator> separators = new ArrayList<>(); final LineRange leftInterval = getVisibleInterval(editor1); final LineRange rightInterval = getVisibleInterval(editor2); final int height1 = editor1.getLineHeight(); final int height2 = editor2.getLineHeight(); final EditorColorsScheme scheme = editor1.getColorsScheme(); paintable.process((line1, line2, isHovered) -> { if (leftInterval.start > line1 + 1 && rightInterval.start > line2 + 1) return true; if (leftInterval.end < line1 && rightInterval.end < line2) return false; separators.add(createSeparator(editor1, editor2, line1, line2, height1, height2, isHovered, scheme)); return true; }); return separators; }